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!

LastUpdated with Current Date based on Update Button Clicked

Status
Not open for further replies.

spining123

Technical User
Jun 5, 2003
33
US
I have an Update Record command button on my forum.

Listed is the event procedure for the Update command button on click.

MsgBox "Record: " & Collection_ID_Number & " Updated in Manuscript Collections"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.GoToRecord , , acEditMenu
Collection_ID_Number.SetFocus


How do I add to the event if I have a text field called LastUpdated. I would like to enter the current date "=Date()" as the Default Value in the LastUpdated field text box when the Update Record command button is clicked.

Your help is truly appreciated. Thank you
 
spining,

The first thing that the code for the command button
should do is:

Me.LastUpdated = Now()

I think that it is better to have the time, instead of
just the day.

Then follow with the rest of the code.

Wayne
 
Thank you Wayne Ryan, I agree with adding the time, because the record can be updated more than once a day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top