Updating a table when closing a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When a user closes a form without entering required fields the forms closes
and no data is saved. How can i insure all the required fields are entered
before closing
 
On the before update event of the form, you can add code that check the
fields, if not value was enetred, prompt the user with a message, and won't
let the form close

If Isnull(Me.[Field1]) Or IsNull(Me.[Field2]) then
msgbox "Must fill fields"
cancel = true 'wont let the user exit the form
End If
 
Back
Top