Parameter Problem in Code

D

Devlin

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.
 
J

John Spencer

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
..
 

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