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

  • Thread starter Thread starter Jim
  • Start date Start date
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
 
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
 
Back
Top