Date updated on input form

emcc

Registered User.
Local time
Today, 22:35
Joined
Dec 14, 2000
Messages
10
I have an input form for prospects and can't seem to figure this out. I would like to have a date field that is automatically updated, that shows the date the form was last updated so when a user opens a form they will see that date.

Thanks!
 
Add a new column to the table. In the BeforeUpdate event of the FORM put:
Me.LastUpdateDt = Now()

Now() is a function that returns the current date and time. If you just want date (not recommended for this purpose), you can use Date().

If your form is based on a query, don't forget to add the new column to it. If the form still doesn't recognize the new column, delete the form's recordsource, save the form, then put the recordsource back. This forces Access to refresh the form's field collection.
 
Pat:

Thanks for your response. I do have a dumb question though! When I add the column, in my case to a query, I'm not sure what I'm supposed to put in the column. And, how do I associate what I'm changing in the Form's properties to the text box where this date will live?

Sorry, I'm new to this aspect of Access.
 
The column must be added to the table in order to store any information permanently. I'm beginning to see wherein your problem lies. You just added a calculated column to a query and set its value to Now(). Recordsets are not persistant objects. They exist only in memory and when the query is closed, they cease to exist.

Once you have added the column to the table, you must also add the column to the query being used as the recordsource for the form. You don't actually need to bind the updateDt field to a control but I usually do unless I'm too short of space on the form.
 

Users who are viewing this thread

Back
Top Bottom