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

How do I display current time on a form? 2

Status
Not open for further replies.

Jimenda

IS-IT--Management
Jun 13, 2001
19
0
0
US
I would like to have a text box on my form that displays a running current time. I would need to use this text box to timestamp any entries thru the from. Any help would be appreciated.

Thanks Jimenda
 
To have this visible and correct on the form, you'd need to utilize the Timer event of the form. I think something like setting the timer intervall to 1000, and something like this in the on timer event:

[tt]me!txtTimeStamp.value = now[/tt]

But, to timestamp records, I usually don't display the timestamp on the form, but use the before insert event of the form when I need the creation time of the record, and the before update event of the form when the timestamp of the last edit is necessary (using similar code as above, to assign values to my CreatedTimeStamp, LastEditTimeStamp controls)

Roy-Vidar
 
There is an FAQ (faq702-1811) also there

Zameer Abdulla
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
Thank You Both.
Where can I find the "Timer Event " on my form?

Jimenda
 
Bring Propeties of the form > Events Tab >
Timer Interval
On Timer

Zameer Abdulla
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
Maybe I'm not bringing up propreties correctly. For one, I am working with ACCESS 2000. I right click on my form and bring up prop. I do not show a timer catagory under events. What do I need to be doing?

Jimenda
 
When you are at the design View of the form click on the small square box at the left-top of the form (where both top and left joins) then click properties icon from the tool bar.
________
|*_|___
| |
| |

Regards

Zameer Abdulla
[sub]Jack of Visual Basic Programming, Master in Dining & Sleeping[/sub]
Visit Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top