DATESTAMP

G

GILBERT

I need set up a command button that will register a date stamp on a text box in the form
 
M

M.L. Sco Scofield

All you need is a little one-liner in the click event of your command
button.

For just the date, use:

txtYourTextBoxName = Date()

(Don't worry if Access removes the parentheses.)

For the date and time, use:

txtYourTextBoxName = Now()

Good luck.

Sco

GILBERT said:
I need set up a command button that will register a date stamp on a text
box in the form
 
J

John Vinson

I need set up a command button that will register a date stamp on a text box in the form

Put the following code in the button's Click event. I'll assume the
button is named cmdSetTime and the textbox is named txtTimestamp:

Private Sub cmdSetTime_Click()
Me.txtTimestamp = Now
End Sub
 
Top