Validating 2 field's data

sdawson

Registered User.
Local time
Today, 22:54
Joined
Apr 22, 2003
Messages
165
On a form I need to esure that if [Field1] = "Condition1" then [Field2] = "Condition2" and the user can not navigate from the record or close the form until the above conditions are true.
Question is where should the Event Procedure sit to ensure this happens?

Thanks
 
One event would be the forms on close event or the before update event,
you also may have to disable any objects that allow a user to find a record ie combo box.
 
Thanx Dennisk
 
you might also put your procedure(s) on the fields (controls) themselves instead of the form so that every time a change occurs in one field the other field is checked right away. if there is no problem with changing the value of a field, you could use the control's After Update event to adjust the other field. i think the On Exit event would also be OK. (See: Order of Events for Database Objects: Changing and Updating Data In a Control: BeforeUpdate → AfterUpdate → Exit → LostFocus).
 
Have put it on [Field1] control on After Update and this is work fine.
Thanks Wazz.
 

Users who are viewing this thread

Back
Top Bottom