report filter

M

micfly

How can I filter an entire month in a report when opening it? This is
access97, thanks.
 
F

fredg

How can I filter an entire month in a report when opening it? This is
access97, thanks.

Not much to go on here!!!!

What month? What year?

The current month?

DoCmd.OpenReport "ReportName", acViewPreview, ,
"Format([DateField],'mm/yyyy') = Format(Date(),'mm/yyyy')"

Do you wish to select the month and year?

DoCmd.OpenReport "ReportName", acViewPreview, , "Month([DateField]) =
[What month?] and Year([DateField]) = [What year?]"

You will be prompted to enter the month number and year.
 
J

John W. Vinson

How can I filter an entire month in a report when opening it? This is
access97, thanks.
= DateSerial([Enter year:], [Enter month number:], 1) AND < DateSerial([Enter year:], [Enter month number:] + 1, 1)

is one of many ways.
 
Top