Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automatically date a record 1

Status
Not open for further replies.

alex304

IS-IT--Management
Jan 29, 2001
83
US
How can I add a line to a form in MS Access 2003 that will automatically show the date the a record was modified? This is a simple database with contact names and numbers. I want to be able to automatically track when records were last updated.

Thanks,

Alex
 
Every time you run an update or append query, pass Date() to be placed in your UpdateDate field?

Ignorance of certain subjects is a great part of wisdom
 
If you would have a field named Update, put the following code in the form on dirty property.

Private Sub Form_Dirty(Cancel As Integer)
Me!Updated = Date
End Sub
 
I made a typing error. Field name Updated was the example on my first posting.
 
Thanks...this works great!!!!!!
 
I have run into problems with this method before, where a user would start making a change, then revert to what was stored there before. Then the record is not really 'updated', but it is treated as if it was.

Just something to think about.

Alex

Ignorance of certain subjects is a great part of wisdom
 
Use the form's BeforeUpdate event instead of the Dirty.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top