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

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
 
R

Rick Brandt

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

Default date 2
Help with Date coding 5
Handling Leap Years 3
help with Sum in between dates 9
Date in unbound textbox 3
Count Years 5
Default to 01/01/ of this year 4
Date Diff Questions 2

Top