Parameter Problem in Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a parameter union query which gets it's criteria from an open form.
I then have a Crosstab query which uses the union query to return results.

This works fine if I am in the database window. However, if I try to open
the Crosstab query as a recordset, I get an error stating "too few
parameters, expected 1."

Can someone help out on this?

Any help is greatly appreciated.
 
First thing, with a crosstab query you MUST declare your parameters and if
any
other queries are used in the crosstab their parameters must also be
declared.

Open the query in design mode
Select Query: Parameters from the Menu
Fill in the EXACT name of the parameter in column 1
Select the data type of the parameter in column 2

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top