display prior month's date

M

MarySue

I generate monthly reports with a macro. In the reports are dates for orders
received.

I want to have the report that is generated in November for October's
Activity show "October" in the heading. I would like to use an expression
that looks at a date field inside the report for October and calculate the
prior month to go in the report's heading.

Thanks in advance for your help.
 
B

Brendan Reynolds

=Format$(DateAdd("m",-1,[OrderDate]),"mmmm")

Replace "OrderDate" with the name of your date field.
 
C

chickalina

How can I use the below code to show the previous quarter and prior?

I have a report that shows detail for quarter selected (i.e Q3-2006), but I
need it to show the previous quarters balance (which equates Q2-2006) and
everything before. There is a beginning balance and changes that occur, so
I'd need to capture everything as a lump sum.
Thanks.

Brendan Reynolds said:
=Format$(DateAdd("m",-1,[OrderDate]),"mmmm")

Replace "OrderDate" with the name of your date field.

--
Brendan Reynolds


MarySue said:
I generate monthly reports with a macro. In the reports are dates for
orders
received.

I want to have the report that is generated in November for October's
Activity show "October" in the heading. I would like to use an expression
that looks at a date field inside the report for October and calculate the
prior month to go in the report's heading.

Thanks in advance for your help.
 

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