How do I default a text box in an Access page to the current date.

  • Thread starter Thread starter Guest
  • Start date Start date
On the properties sheet, set the default value to "=Date()" without the
quotes. Each time a new record is created with the form, your text box will
be populated with the current date.
 
Set the defaul value to Now()

Mark said:
On the properties sheet, set the default value to "=Date()" without the
quotes. Each time a new record is created with the form, your text box will
be populated with the current date.
 
Be aware, though, that Now includes both date and time.

While that's often what you want, it does mean that you will be unable to
simply query by date: you can't, for instance, do a SELECT * FROM MyTable
WHERE MyDateField = #08/24/2005# to get all of the records associated with
yesterday. (Of course, there's an easy workaround: SELECT * FROM MyTable
WHERE MyDateField Between #08/24/2005# And #08/25/2005#)
 

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