K
Kahuna
Hi Folks - not come across this one before.
I use code behind the report to use complex rowsource SQL dependant upon
what the client has requested in the set-up form.
All was well until I expanded the report to encompass many more data items
and calculations - with the query SQL supplying just the required end
figures.
Because this recordsource SQL is now relatively large - A97 is balking at
its size suggesting that 2048 is the maximum characters allowed (I am
assuming it means as a SQL recordsource property - error is vague). The SQL
works fine in the query window. So here's my question:
I can save this query and use it as the recordsource directly in the
properties of the report but...
How can I supply the name of a saved query to the recordsource of the report
at runtime (what's the syntax)?
This is essential because I'll now have several saved queries.
Or... would it be better to save a query, set it as the recordsource in the
report property, and set its sql properties to my SQL at run time??? If so,
suggestions on syntax for that would be useful too.
I use code behind the report to use complex rowsource SQL dependant upon
what the client has requested in the set-up form.
All was well until I expanded the report to encompass many more data items
and calculations - with the query SQL supplying just the required end
figures.
Because this recordsource SQL is now relatively large - A97 is balking at
its size suggesting that 2048 is the maximum characters allowed (I am
assuming it means as a SQL recordsource property - error is vague). The SQL
works fine in the query window. So here's my question:
I can save this query and use it as the recordsource directly in the
properties of the report but...
How can I supply the name of a saved query to the recordsource of the report
at runtime (what's the syntax)?
This is essential because I'll now have several saved queries.
Or... would it be better to save a query, set it as the recordsource in the
report property, and set its sql properties to my SQL at run time??? If so,
suggestions on syntax for that would be useful too.