More on Dirty per DG rqst

  • Thread starter Thread starter Elwin
  • Start date Start date
E

Elwin

Without confusing the matter too much, 'Me' is a reference
to the class module's object (the form). 'Dirty' is a
property of the object that returns True if any of the
field values change. When the dirty property is set to
true, the form also fires its OnDirty() event. I'd
suggest that you use the form's OnDirty() event since its
been provided to do exactly what you're trying to
accomplish. Good Luck.

Private Sub Form_Dirty(Cancel As Integer)
Me!Effdt= Now()
End Sub
 
Thanks, not confusing at all now that I'm getting the hang
of the lingo. I have Access97 - I don't think I have
OnDirty capability. Also, now that I have attempted the
code others recommended, I can't even enter a full date in
a different field without it running the update query to
effdt. Boy, what fun.
 
Carrie said:
Thanks, not confusing at all now that I'm getting the hang
of the lingo. I have Access97 - I don't think I have
OnDirty capability. Also, now that I have attempted the
code others recommended, I can't even enter a full date in
a different field without it running the update query to
effdt. Boy, what fun.

What update query? Is this a confusion on your part, or is there
something you're not telling us? Maybe you ought to post the entire
contents of the form's module.

You're right that there's no Dirty event in Access 97.
 
I assume the BeforeUpdate event that sets my EFFDT = Date
() is some sort of query because when I change any field
on the form - just clearing it! before I even begin
typing, the "Running Query .... Msg" shows up in the lower
left of the database window. I have an END Date field
which my user changes when a benefit is terminated, but
every key stroke runs the query for the event proc. Your
recommended code is the only thing I changed. Plus, it
updated every record in the table - all 3500+. so it
doesn't work for me.
 
Back
Top