I have a button in a popup form that creates a where clause to be used when opening a report. It does not apply the where clause. How do I get this to happen.
Code under button.
Dim whereclause As String, args As String
Dim DocName As String
''whereclause = "rqStatus = 1"
DocName = "rptManagerClientHoursSummary"
DoCmd.OpenReport DocName, acViewPreview, , whereclause
Code in Report.
Private Sub Report_Open(Cancel As Integer)
'- set filter
Me.FilterOn = True
Debug.Print "query = "; Me.RecordSource
Debug.Print "filter = "; Me.Filter
End Sub
Code under button.
Dim whereclause As String, args As String
Dim DocName As String
''whereclause = "rqStatus = 1"
DocName = "rptManagerClientHoursSummary"
DoCmd.OpenReport DocName, acViewPreview, , whereclause
Code in Report.
Private Sub Report_Open(Cancel As Integer)
'- set filter
Me.FilterOn = True
Debug.Print "query = "; Me.RecordSource
Debug.Print "filter = "; Me.Filter
End Sub