Command button attached to date field ..properties/code.

  • Thread starter Thread starter Dave B
  • Start date Start date
D

Dave B

I would like to create a command button which when clicked will insert the
current date in a Date field. I can create the button and field.

Please advise what properties or code I need to accomplish this.
Thank you.

Dave B
 
You can use the control and semi-colon keys: (Ctrl ;) to accomplish this.
But if you want to use a button just write the code like this:

Sub MyButton_Click()
Me.MyField = Date
End Sub

Where MyButton is your button's name and MyField is the name of your textbox
control holding the date field.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top