add a button to access form to input current date

danthegolfer

New member
Local time
Today, 05:10
Joined
Jan 4, 2010
Messages
2
hey, i would like to add a button to my form in access. when the button is clicked i would like it to insert the current date in one of the fields in the form.

i would also like to do this for a second button and second field, except i want it to insert the current time.

(i know how to do this in excel, but i dont know the syntax for doing it in access)

thanks, dan
 
In the appropriate button's OnClick event:

Me.TimeField = Time

Me.DateField = Date

Note that there are shortcuts for these also:

Date

<Ctrl> + <;>

Time

<Shift> + <Ctrl> + <;>
 

Users who are viewing this thread

Back
Top Bottom