Change prompt

  • Thread starter Thread starter Robgould
  • Start date Start date
R

Robgould

Guest
I have a contacts form in my database. This form updates outlooks contacts as a side function. This works fine.

The user has to click a button to cause the update to occur.

I have set up the form to set a check box to false if the form is changed, and then to true when outlook is updated so that the user can tell if outlook has been updated or not.

What I want to do is trigger an event when the user navigates away from the current record. This message would occur if the checkbox is still set to false and prompt the user to update outlook.

I can not find an appropriate event at the form level.

Any ideas?
 
Use the Form's BeforeUpdate event. Add code to check if your checkbox is false or true, maybe something like
Code:
Cancel = Not Me.MyCheckbox
 
I don't think I understand what you mean. I tried the BeforeUpdate, but ir runs everytime the form is refreshed. I just want the envent to run when the record is actually changed.

I have to refresh the form in various places to keep the form display correct, so the code would run often.

Is there a way to use the beforeupdate event and check to see if the record is being changed?
 

Users who are viewing this thread

Back
Top Bottom