DATESTAMP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need set up a command button that will register a date stamp on a text box in the form
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top