C
Chuck
Hi,
I'm trying to set a subreport's RecordSource property from the parent report
but am getting this error:
Run-time error '2455' You entered an expression that has an invalid
reference to the property Form/Report.
The code is entered in the parent form's OnOpen event and uses this syntax:
Reports![report_name]![subreport_name].Report.ControlSource
The reference appears correct and if I use a dot instead of a bang when
typing in the code, Access auto-completes correctly (at least it uses the
same refenreces I used manually).
I've been reading up on this and apparently reports and subreports will give
inconsistent results (as opposed to setting a sub-form's properties from the
parent form - which I do regularly without any problems).
So now to my question.
I read an article that suggests using a class module to set the subreport's
ControlSource property from the parent report. I have no idea how to do
this so any pointers or example Db would be appreciated.
Thanks
Chuck
I'm trying to set a subreport's RecordSource property from the parent report
but am getting this error:
Run-time error '2455' You entered an expression that has an invalid
reference to the property Form/Report.
The code is entered in the parent form's OnOpen event and uses this syntax:
Reports![report_name]![subreport_name].Report.ControlSource
The reference appears correct and if I use a dot instead of a bang when
typing in the code, Access auto-completes correctly (at least it uses the
same refenreces I used manually).
I've been reading up on this and apparently reports and subreports will give
inconsistent results (as opposed to setting a sub-form's properties from the
parent form - which I do regularly without any problems).
So now to my question.
I read an article that suggests using a class module to set the subreport's
ControlSource property from the parent report. I have no idea how to do
this so any pointers or example Db would be appreciated.
Thanks
Chuck