On Dirty Question

G

Guest

Does the On Dirty event happen just once per edit?

The reason I ask is because I have a form that has a date field "Last
Edited" that is locked to the user. When a change is made on the form I use
the On Dirty event to run the following code.

Me.txtLastUpdated = Format(Now(), "mm/dd/yy")

It works fine,but when I put in a break point at this line of code I and
step through, it appears as though the line of code is repeating many times.
I have about 20 controls on the form and I have hit the F5 button to
continue to the next break point and I keep hitting this break point over
and over.

If I don't have the break point the form comes back to focus right away but
I am still supicious.
 
G

Graham Mandeno

The Dirty event is realively new (A2002) and I haven't investigated how
often it is raised. However, I recommend you put your code in the form's
BeforeUpdate event. That way you can be sure it only runs when the record
is updated.

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.
 

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

Top