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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Record revisions to a record

Status
Not open for further replies.

kgerlitz

Technical User
Oct 2, 2004
84
0
0
US
I would like to have a field in my table that uses the Now() function whenever any field in the record has been revised. Not sure where to start on this one. Thanks for your help
 
You can put it in the Before Update event of the form. Something like this:
Private Sub Form_BeforeUpdate(Cancel As Integer)
txtLastModified.Value = Now()
Exit Sub
 
Thanks Lilliabeth.

The first run did not work, modified the code to read as below and works fine. I'm not real familiar with this code stuff yet, but know enough to get by on occasion. Do appreciate you pointing me in the right direct.

Private Sub Form_BeforeUpdate(Cancel As Integer)
[txtLastModified] = Now()
Exit Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top