I am trying to preview a report based on a Filter by Form. The thread Thread703-796248 provided the coding below, which works great when the form is based on a single table.
If Me.FilterOn Then
DoCmd.OpenReport stDocName, acViewPreview, , Me.Filter
Else
DoCmd.OpenReport stDocName, acViewPreview
End If
However, I use a "generic" query to show fields from three different tables in the form. (There are no criteria specified in the query.) When I use the above coding, I get a message box about supplying a value, which does not affect the records generated for the report.
Can someone suggest language that will pass the records from a "filter by form" to a report when the form is based on a query of multiple tables?
Thanks,
Lloyd
If Me.FilterOn Then
DoCmd.OpenReport stDocName, acViewPreview, , Me.Filter
Else
DoCmd.OpenReport stDocName, acViewPreview
End If
However, I use a "generic" query to show fields from three different tables in the form. (There are no criteria specified in the query.) When I use the above coding, I get a message box about supplying a value, which does not affect the records generated for the report.
Can someone suggest language that will pass the records from a "filter by form" to a report when the form is based on a query of multiple tables?
Thanks,
Lloyd