Hi Folks
First post, and I'll get my excuses in early...I'm really a GIS guy with some MS Access querying experience who's been roped in to develop a few Access reports - so apologies for my poor practice/ poor terminology/ general ignorance!
I've developed a report which works fine in Report View, but throws the error below when I switch to Print Preview mode:
Run-time error 2467 - The expression you entered refers to an object that is closed or doesn't exist.
Any suggestions on how I get round this would be much appreciated!
The report itself contains a List Box and a set of sub-reports (only 2 at the moment, but it will be around 10 when I get the functionality working).
The report has an On Load event which sets a default value for the list box and re-queries the sub-reports.
The list box has an On Click event which also re-queries the sub-reports when a new value is selected.
The sub-reports are each based on a separate aggregate query, which each take the value from the list box as one of the filter criteria (hence the need to set a default value and re-query the sub-reports when I open the report).
The sub-reports display a set of values from the aggregate query, and each value has an On Click event which opens another query in datasheet view.
As I say, all of this works fine in Report View, but I get the run-time error when switching to Print Preview, so I'm wondering if some of this functionality isn't compatible with the datasheet view? The debugger from the error message takes me to the first 'requery' event of the Report_Load event which is:
'Me.[rpt_pipeline_Design_01_AwaitingPreCheck subreport].Report.Requery'
Any thoughts/ suggestions welcomed, happy to post more info if it helps!
Thanks in advance.
First post, and I'll get my excuses in early...I'm really a GIS guy with some MS Access querying experience who's been roped in to develop a few Access reports - so apologies for my poor practice/ poor terminology/ general ignorance!
I've developed a report which works fine in Report View, but throws the error below when I switch to Print Preview mode:
Run-time error 2467 - The expression you entered refers to an object that is closed or doesn't exist.
Any suggestions on how I get round this would be much appreciated!
The report itself contains a List Box and a set of sub-reports (only 2 at the moment, but it will be around 10 when I get the functionality working).
The report has an On Load event which sets a default value for the list box and re-queries the sub-reports.
The list box has an On Click event which also re-queries the sub-reports when a new value is selected.
The sub-reports are each based on a separate aggregate query, which each take the value from the list box as one of the filter criteria (hence the need to set a default value and re-query the sub-reports when I open the report).
The sub-reports display a set of values from the aggregate query, and each value has an On Click event which opens another query in datasheet view.
As I say, all of this works fine in Report View, but I get the run-time error when switching to Print Preview, so I'm wondering if some of this functionality isn't compatible with the datasheet view? The debugger from the error message takes me to the first 'requery' event of the Report_Load event which is:
'Me.[rpt_pipeline_Design_01_AwaitingPreCheck subreport].Report.Requery'
Any thoughts/ suggestions welcomed, happy to post more info if it helps!
Thanks in advance.