Need to have a date field updated to today if diff field of record chgd.

  • Thread starter Thread starter Carrie
  • Start date Start date
C

Carrie

Automatic update of a date field to today... Inserting
records works terrific; how do I do it for an updated
record? I have a form displaying one record at a time.
The user can change various fields but rather than
requiring her to change the 'date keyed' field ALSO (she
forgets), I would love to have it change to 'today'
automatically. When I attempted to code using some such
field property, I updated EVERY record in my table. NOT
GOOD. Do I need a VB command or can this be done easily
in Access? (Access 97)
 
Pardon my ignorance of your reference... What
does 'Me.dirty' mean? If EMPL_MASTER.? then
[EMPL_MASTER]![EFFDT]=Now()
 
In the BeforeUpdate field of the form.
If Me.dirty then
me!yourDateField = Now()
end if

This will work *even* if something is changed, then changed back.
Usually not a problem and a lot of work if it won't do.
 
Thanks - I think I got it.
-----Original Message-----
In the BeforeUpdate field of the form.
If Me.dirty then
me!yourDateField = Now()
end if

This will work *even* if something is changed, then changed back.
Usually not a problem and a lot of work if it won't do.




.
 
The easiest way to do this is to open the properties for that field and
cursor over to the "default value" field. Browse, scroll down to
"functions".

Then scroll down to "built in functions". Select Date/Time.
 
Back
Top