Trying to Apply Code Upon Record Change

mjseim

Registered User.
Local time
Yesterday, 23:30
Joined
Sep 21, 2005
Messages
62
I can't imagine this is hard... I just can't seem to figure it out.

How to I force code to run JUST BEFORE I change from one record to another record in a form. I also want it to run if I close the form. Basically, I want this code to run whenever a LEAVE A RECORD in a form.

Can anyone help me out here?
Thanks!
 
It sounds like you're trying to do some validation on the record's contents before going to the next record. The best way to do that is at the field level, as each field will have a Validation Rule property. For the entire form, there's the BeforeUpdate event that will fire before you go to the next record. You can also use the OnClose event to capture the closing of the form.
 
Excellent. Thanks for your help.

In addition, I thought I'd post that I am using the "call" function to apply the same code for different functions (BeforeUpdate, OnClose). This way I don't have to retype the same code!!
 

Users who are viewing this thread

Back
Top Bottom