Todays date

G

Guest

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()
 
G

Guest

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()
 

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

Top