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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top