Why do I get this error when I run this code from a report's open event?
strSQL = "Select * from qsrptCaveat"
If Forms!fdlgPrint!chkInclude = False Then strSQL = strSQL & " Where
[Withdrawn] = 0"
Me.subCaveat.Report.RecordSource = strSQL
"subCaveat" is the object name (not the report name) of the sub-report on
the report. The error message is:
"You entered an expression that has an invalid reference to the property
Form/Report."
The report runs fine when I don't try to set its record source at runtime.
Many thanks.
Keith.