How do I add a field to a table that captures the date that a record has been updated?
How do I add a field to a table that captures the date that a record has been updated?
Add a Date type field to the table. Add a textbox control to the form used to update the table. The new textbox needs to be bound to the new field. In the forms Before Update event:
Me.NewTextboxName= Now()
If this helped, please click the star at the bottom left of this posting and add to my reputation. Many thanks.
Bob Fitzpatrick
So far so good but... I don't understand the "In the forms Before Update event: Me.NewTextboxName= Now()" part. The "Me." has Access looking for a Macro. Do I substitute something for the "Me." or do I need to create a new Macro?
I now have the record update date on the form. However, when I close the form Access give me an error pop-up message saying that "You can't save this record at this time." It goes on to state that the database encountered an error trying to save the record. The db asks if I want to close the database object anyway. If I say Yes it blows away the date. If I say No is saves the date in the database. How do I stop this error message pop-up from occurring? Thank you in advance for this help. Tom
Dummy me put the Event Procedure in the After Update row instead of the Before Update row in the Form/Event window. It's working now. Thanks again. You can image how long I've been trying to figure this out on my own.I now have the record update date on the form. However, when I close the form Access give me an error pop-up message saying that "You can't save this record at this time." It goes on to state that the database encountered an error trying to save the record. The db asks if I want to close the database object anyway. If I say Yes it blows away the date. If I say No is saves the date in the database. How do I stop this error message pop-up from occurring? Thank you in advance for this help. Tom![]()