M micfly Dec 15, 2008 #1 How can I filter an entire month in a report when opening it? This is access97, thanks.
F fredg Dec 15, 2008 #2 How can I filter an entire month in a report when opening it? This is access97, thanks. Click to expand... 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.
How can I filter an entire month in a report when opening it? This is access97, thanks. Click to expand... 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 Dec 16, 2008 #3 How can I filter an entire month in a report when opening it? This is access97, thanks. Click to expand... = DateSerial([Enter year:], [Enter month number:], 1) AND < DateSerial([Enter year:], [Enter month number:] + 1, 1) Click to expand... is one of many ways.
How can I filter an entire month in a report when opening it? This is access97, thanks. Click to expand... = DateSerial([Enter year:], [Enter month number:], 1) AND < DateSerial([Enter year:], [Enter month number:] + 1, 1) Click to expand... is one of many ways.