tweety1201
Technical User
I am trying to create a report based on a query. I have created a popup form for data input.
In the query I have specified the required criteria Between [Forms]![Calendar]![BeginningDate] AND [Forms]![Criteria]![EndingDate]. I have created a print preview button on the Form which contains the following code
Private Sub Preview_Click ( )
DoCmd.OpenReport "Report Name", acViewPreview, , "[BeginningDate] = '" & Me("BeginningDate" & "[Ending Date] = '" Me("EndingDate" & "'"
End Sub
I cannot get the code to run. What am I doing wrong?
Please help
In the query I have specified the required criteria Between [Forms]![Calendar]![BeginningDate] AND [Forms]![Criteria]![EndingDate]. I have created a print preview button on the Form which contains the following code
Private Sub Preview_Click ( )
DoCmd.OpenReport "Report Name", acViewPreview, , "[BeginningDate] = '" & Me("BeginningDate" & "[Ending Date] = '" Me("EndingDate" & "'"
End Sub
I cannot get the code to run. What am I doing wrong?
Please help