Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change RecordSource for report with code

Status
Not open for further replies.

BruceMJC

IS-IT--Management
Jul 2, 2003
8
US
Access 97 indicates one can change the RecordSource property of a report using VB code...when I try before the report code, it can't find the report (wants the report open, I think). When I try to do it after the report run, it says I must change the property before the report prints. So how do I get around this apparent "catch 22"?
 
I use the reports on open event to set the recordsource of the report. In my situation, I have a form and that form loads the users name. I then open the report from my form and the on open event of the report is used to set the recrodsource using sql.

Hope that helps

Fred
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top