Hi, I would like to run a single report but change the record source depending on what option is selected from a form. I've picked up this database from someone else and the method used for setting values and opening reports is via Macros rather than VBA.
I've tried using SetValue but it errors:
Item: [Reports]![ReportName].[RecordSource]
Expression: [Queries]![QueryName]
Error: The object doesn't contain the Automation object 'Queries.'.
If I put "" around the query then it come back with "The object you referenced in the Visual Basic procedure as an OLE object isn't an OLE object.
I'm pretty stumped as to how you go about this and I've tried using IF, ELSE in a single query to put all the variations in a single query but Access doesn't like that.
Has anyone done something like this before?
Many thanks for any help offered.
I've tried using SetValue but it errors:
Item: [Reports]![ReportName].[RecordSource]
Expression: [Queries]![QueryName]
Error: The object doesn't contain the Automation object 'Queries.'.
If I put "" around the query then it come back with "The object you referenced in the Visual Basic procedure as an OLE object isn't an OLE object.
I'm pretty stumped as to how you go about this and I've tried using IF, ELSE in a single query to put all the variations in a single query but Access doesn't like that.
Has anyone done something like this before?
Many thanks for any help offered.