-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
In DAO you can open query2 that uses query1 with parameters, but there
are no parameters in query2. You just assign the parameter values to
the query2 QueryDef. E.g.:
dim qd as dao.querydef
set qd = db.querydefs("q uery2")
qd.parameters(" LastName")="Smi th"
qd.parameters(" IDNumber")=1234 5
set rs = qd.OpenRecordse t()
Perhaps you can do the same in ADO - just set the parameters for
query1, but set them in the ADO setup for query2.
HTH,
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQAH7WIechKq OuFEgEQInKACffF eBEw1jAFOjPi4vz 4OEOPecAoYAoJNB
QlMFFKeVvSTR0An KVpJuvHBD
=XqQa
-----END PGP SIGNATURE-----
Jim wrote:
MS-Access 2002
I have a query (Q2) based on a parameter query (Q1) and need to set the
parameters within a VBA module. I am using ADO, and opening the query (Q2)
as a fordwardonly recordset.
Since Q1 isn't explictly opened in the VBA code, I'm not sure how to set
the parameters.
I do not want to run Q1 to load a table and then have Q2 based on the table
if I can avoid it. Nor do I want to place the parameters in a table and
have Q1 reference them there.
Any suggestions ?
Thanks