Time stamp

sonny

Registered User.
Local time
Today, 13:03
Joined
Mar 2, 2004
Messages
140
If I wanted to display the date when a button was last pressed on my form, how would one go about this.
 
Depends where you want to display it but:

Msgbox Now()

On the click event of the button will do it.
 
on click

Assuming you have a text box (name txtTimeStamp) on your form which is tie to some field in your table. You can create new field "TimeStamp" in your table.


Private Sub Button_Click()
me.txtTimeStamp = now()
End Sub
 
I think he wants when the button was last pressed. Not as it being pressed now. In other word the date of the last session in which the button was pressed. So when he clicks on the button it goes to the last record of the clickDate field in the clickButtonTable displays it and then afterward inputs the current date.
 
Yeah, thats what Im looking for, when it was last pressed...
 
You will have to store the date in a table and update it each time the button is clicked. Then you can retrieve it with something like a DLookup formula.
 
Thanks. I have'nt used the DLookUP thing before but will use the help file to figure out. I do have a table for it to store already. I was experimenting with how to do this. I'll look into this DLookUp thing though, thanks!
 

Users who are viewing this thread

Back
Top Bottom