-----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("query2")
qd.parameters("LastName")="Smith"
qd.parameters("IDNumber")=12345
set rs = qd.OpenRecordset()
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:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQAH7WIechKqOuFEgEQInKACffFeBEw1jAFOjPi4vz4OEOP ecAoYAoJNB
QlMFFKeVvSTR0AnKVpJuvHBD
=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