Insert a specific (but variable) date each time a report is run

  • Thread starter Thread starter Kellee
  • Start date Start date
K

Kellee

I am wondering how to insert a date field into a report that will
automatically populate with the 20th of the month in which I am running the
report. I run these reports several times a month, but the date I need
inserted into the report will always be the 20th. How do I set this up?

I am using Access 2003 and my form is based on a parameter query.

Any advice you can offer would be appreciated!
 
I am wondering how to insert a date field into a report that will
automatically populate with the 20th of the month in which I am running the
report. I run these reports several times a month, but the date I need
inserted into the report will always be the 20th. How do I set this up?

I am using Access 2003 and my form is based on a parameter query.

Any advice you can offer would be appreciated!

This month you wish to display 6/20/2008?
Using an unbound text control:
=DateSerial(Year(Date()),Month(Date()),20)

Will always return the 20th, in the Windows Date setting Format of
whatever month you run this report.

If you wish a different format, perhaps June 20, 2008, you can use:

=Format(DateSerial(Year(Date()),Month(Date()),20),"mmmm d, yyyy")
 
fredg said:
This month you wish to display 6/20/2008?
Using an unbound text control:
=DateSerial(Year(Date()),Month(Date()),20)

Will always return the 20th, in the Windows Date setting Format of
whatever month you run this report.

If you wish a different format, perhaps June 20, 2008, you can use:

=Format(DateSerial(Year(Date()),Month(Date()),20),"mmmm d, yyyy")

Thanks, Fred! This did exactly what I was hoping!
 
Back
Top