Query based on a parameter query, using VBA how do I to set the parameters

J

Jim

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
 
M

MacDermott

Open Q2 in Design View.
On the menu, click Query - Parameters
Add the parameters from Q1 - name and datatype.

Now you can reference these as parameters of Q2.

HTH
- Turtle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top