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

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!
 
F

fredg

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")
 
K

Kellee

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!
 

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