The code concludes with the following statement to create the SQL to select the correct records:
Expand|Select|Wrap|Line Numbers
- Me.subfrmlogforfiltering.Form.RecordSource = "Select " & topinsert & " * FROM logforfiltering WHERE " & strWhere
Expand|Select|Wrap|Line Numbers
- DoCmd.OpenReport "rptlogforfiltering", acViewPreview, OpenArgs:=Me.subfrmlogforfiltering.Form.RecordSource
Expand|Select|Wrap|Line Numbers
- Private Sub Report_Open(Cancel As Integer)
- Me.RecordSource = Me.OpenArgs
- End Sub
Expand|Select|Wrap|Line Numbers
- Openargs print: Select All * FROM logforfiltering WHERE (([NCStatus] = 'Initial Notification'))
- Recordsource print: Select All * FROM logforfiltering WHERE (([NCStatus] = 'Initial Notification'))