Data Validation

  • Thread starter Thread starter Bunky
  • Start date Start date
B

Bunky

I have put several edits in place to ensure the data is entered on different
forms. Then I found out that if you use the navigation arrows at the bottom
of the screen, all of my edits are bypassed. What event should I use in
order to make certain the data has gone through the edits? I have tried
after update, before update, and several others but no luck yet. Suggestions?
 
Your validations are probably in the BeforeUpdate event of your form (as
they should be). The problem is that when users scroll between records, if
they haven't changed anything, the BeforeUpdate event doesn't fire off. One
way to ensure that the validations will be run is to make the record dirty.
In the form's OnCurrent event, set a field equal to itself (Me!Field1 =
Me!Field1). Your record is now dirty - you should see the "pencil" in the
record selector. When the user attempts to move to the next record, the
validations will fire off.
 
Thank you, Scott!
As a matter of fact the validations are in the AfterUpdate event on the
close form button and I want to move them so you have answered two questions
for the price of one!!

Thanks again
 

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