Question : VBA Report Recordsource Issue/Question

don't want to hear about the structure of my database. I just want to know how to accomplish this task.

I have I series of colonies that consist of the same table. I have a variable that holds the colony number from login. I would rather not make a few copies of the same report. I have a report with a subreport and I am getting an error# 2191 in access when I try to change the record source for both the Report and subreport. The reports themselves I removed the record source and then through VBA I use the me.recordsource = "(myQuery)"
When I run the report and sub report serperately they work just fine but when I open it as intended I get there Error 2191.

Error 2191  Message = You can't set the recordsource property after printing has started.

Answer : VBA Report Recordsource Issue/Question

DanaGarcia,

I don't want to complicate matters and detract from the Original askers question.
But you are saying that my code errors out and you are posting the message, but you are not posting the actual code that you used that failed, so this is difficult to troubleshoot.
The basic concept is contained in the attached sample.

If you have any questions, feel free to email me.
;-)

JeffCoachman

Random Solutions  
 
programming4us programming4us