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

command button to populate time box 1

Status
Not open for further replies.

nickbrookes

Technical User
May 12, 2001
20
0
0
GB
I'm trying to design a form to have the start and stop times of certain processes recorded. I've got a box to manually input the time (which I'll need), but i would also just like to have a command button which automatically populates the box with the time now( down to the second if possible).

Thanks in advance.

Nick
 
For the command button's OnClick event use the following syntax:

...
Me.NameOfControl = Now()
...

This will store the date and time (which you'll find may come in very handy later and doesn't "cost" anything in terms of database size). Set the control's format property to Long Time to only display the time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top