Manipulate report record source

J

Jason

I have one report that I would like to use to display several different
record sources (just filtering results). How do I code this manipulation on a
form used to open the report? I tried the code below but it gives me a
"Run-time error ' 2465': Application-defined or object-defined error"

Reports!rptOpenCARs.ControlSource = strSQL
 
A

Allen Browne

You can set the RecordSource of the report in its Open event.

You cannot do it from elsewhere, as the timing will be too late.
 
J

Jason

Is there a way I can pass a string or some information to the report from a
form to indicate which dataset I want the report to display?
 
Top