how do i get a date in a form to default to 01/01 of this year

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use a form where you input the beginning and ending dates which are used to
generate a report that shows only records in the date range. I'd like the
beginning date to default to 01/01 of this year and the ending date to
default to 12/31 of this year. I also want the year to change with each new
year, IE this year it defaults to 2006 and next year would change to 2007.
How can i make that happen? Example:

Beginning date = 01/01/2006
Ending date = 12/31/2006

thanks for your help
 
Default said:
I use a form where you input the beginning and ending dates which are
used to generate a report that shows only records in the date range.
I'd like the beginning date to default to 01/01 of this year and the
ending date to default to 12/31 of this year. I also want the year to
change with each new year, IE this year it defaults to 2006 and next
year would change to 2007. How can i make that happen? Example:

Beginning date = 01/01/2006
Ending date = 12/31/2006

thanks for your help

Use DefaultValue properties of...

=DateSerial(Year(Date()), 1, 1)
=DateSerial(Year(Date()), 12, 31)
 

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

Similar Threads

Please help! date showing as 1900/01/00 2
Default date 2
Handling Leap Years 3
Help with Date coding 5
Date in unbound textbox 3
Default to 01/01/ of this year 4
help with Sum in between dates 9
Count Years 5

Back
Top