Hello, Larry.
The reason I intended to do that is the following:
Everybody can import my queries from MDE. Although VBA is secured, structure
of tables and queries are not.
So, I wated to preserve SQL string as string inside VBA function, rather
than in saved pass-through query.
VBA code placed On Open of report would create temporary QueryDef object
(pass-through query) using that SQL string and resulting recordset should be
passed to report. Everything shoul be done through code, without using any
saved queries or tables.
Only the last step is unclear to me, regarding passing recordset to
report...
Please, explain me how to do that, if you know.
Maybe you suggest to use db.OpenRecordset ("sqlstring").Name for
Me.RecordSource ?
Well, I'm aware that it works for JET queries, but how to implement the same
with pass-through query/statement ?
BAsically, my question is the following: How to assign temporary
pass-through query resulting recordset to a report ?
Thanks in advance.
Zlatko