More on Dirty per DG rqst

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
 
C

Carrie

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.
 
D

Dirk Goldgar

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.
 
C

Carrie

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.
 

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