Getting a hidden text box to display the current date

Brad4566

Brad
Local time
Today, 16:54
Joined
Nov 19, 2004
Messages
8
I am trying to get a text box that is linked to a table to display the current date when the form loads. Any help would be helpful. Thanks
 
If you want an unbound textbox to display the current date, just use the following in the control's ControlSource -
=Date()

If you want to actually store the date/time a record was changed, you need a column in your table to hold the updated date. Then use the Dirty event to populate it if you want it to be visible on the form. If it doesn't need to be visible, use the form's BeforeUpdate event.

Me.LastUpdateDt = Now() ' this stores both the date and time. Date() stores just the date.
 

Users who are viewing this thread

Back
Top Bottom