var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Can I set a Report RecordSource property if i dont know the report name yet?
I'm trying to make a form that lets you choose which report to run. Unfortunatly im having a bit of difficulty. I can get a named report to open, but I cant set its RecordSource.
to run the report I'm just doing this:
DoCmd.OpenReport Me.ReportBox, acPreview
That seems to work fine, but I'm trying to do this afterwards...
Reports!("'" & Me.ReportBox & "'").RecordSource = SQL
Also tried this
Reports!"[" & Me.ReportBox & "]".RecordSource = SQL
I'm a code newb, so I'd appreciate a tip on the correct syntanx.
There is no collection called Reports
But you can do the following:
In your report Open event write
Where yourTextBox is a textBox on your Form containing a table or queryName, which should be the RecordSource of your Report
Thanks, I did the whole thing in the report.
The downside is that i need to repeat that for each template.
Does it function now? Hope yes....