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

"Time stamp" Date/Time when Name Field populated

Status
Not open for further replies.

Conner

Technical User
Nov 29, 2000
44
US
Have a form used to determine when an employee leaves the building. Similar to a time card. Has two textboxes -- one for LastName and the other CheckOutTime. When the employee enters Last name in LastName, I want CheckOutTime to automatically enter the date and time. Similar to what the Now( ) function does, but I don't want the date and time to change. Want it "frozen" at that moment...Can this be done?

 
In the LastName's AfterUpdate event, put:

CheckOutTime = Now()
DoCmd.RunCommand acCmdSaveRecord

and ensure that the field is locked in design mode so it can't be changed by editing the field. This will update the field and save the data.

John
 
Worked like a charm! Sincere thanks for your quick response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top