Todays date

M

Moody

Hello,

i have done this before but i cant recall, how do i enter todays date in a
date field by clicking a command button or even have the date already on the
field when the form opens, would this require me to go back to the table or
can i do this from the form.

can anyone help, sorry to sound silly but i cant seem to do this.

Thank you
 
A

Allen Browne

Open the form in design view.
Right-click the date field, and choose Properties.
Set the Default Value property to:
=Date()

You can enter today's date with the keyboard by pressing Ctrl+;

In code, you could assign today's date to a control named InvoiceDate with:
Me.InvoiceDate = Date()
 
M

Moody

Thanks, sorry for the late reply

Allen Browne said:
Open the form in design view.
Right-click the date field, and choose Properties.
Set the Default Value property to:
=Date()

You can enter today's date with the keyboard by pressing Ctrl+;

In code, you could assign today's date to a control named InvoiceDate with:
Me.InvoiceDate = Date()
 
Top