ApplyFilter method in a Report (2000)

I'm trying to apply a filter to a the Produzioni report in the attached mdb by using
DoCmd.ApplyFilter , "[Giorno] between #1/11/2004# and #31/12/2004#"
in the Open event of the report and setting the FilterOn property to Yes in the report property sheet but it still returns all the records.

Re: ApplyFilter method in a Report (2000)

Re: ApplyFilter method in a Report (2000)

I'm trying substituting values drawn from text boxes on Form1 in place of the static values in DoCmd.ApplyFilter , "[Giorno] between #1/11/2004# and #31/12/2004#"
so I use(please see attachment)
DoCmd.ApplyFilter , "[Giorno] between #" & Format(Forms!form1!text0, "mm/dd/yyyy") & _
"# and #" & Format(Forms!form1!Text2, "mm/dd/yyyy") & "#"
in the report open event but I get an error message.

Re: ApplyFilter method in a Report (2000)

The Report_Open event appends the filter to itself several times. Clear the Filter property of the report, set Filter On to No, remove the code from the On Open event, and instead, open the report from a command button on the form. Here is the code to use in the On Click event of the command button: