User entered data in a Query - Jet Engine Error

G

Guest

I have a very simple query that is pulling all information from one previous
query. I have a field called "Area" that I want to be a user-entered field
(the user will enter the specific area they want to see the information for).
I've done this many times, but some reason, with this query, I keep getting
an error message saying

"The Microsoft Jet Engine Database does not recoginize '[Please Enter
Desired Area]' as a valid fieldname or expression."

Thanks in advance for any help.
 
G

Guest

Where the criteria, first or second query?
If you run the first query, do you get an error?
Can you post your SQL?

The query SQL should look something like

Select Field1, Field2 From TableName Where Field1 = [Please Enter Desired
Area]
 
J

John Spencer

Is this a crosstab query?

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
 
G

Guest

John,

I have the same problem and was looking for an answer in existing questions
before I posted my own - but I think this will answer it.

My query pulls togehter a lot of info, including a couple of Crosstabs and
one or two select queries.
Can I confirm - the parameters I need to declare is the field name and data
type for the field on which I'm doing the filter on, but what other fields do
I need to declare - all the other field names that have come from a Crosstab?
all the other fields that have come from another query? I'm not sure.

Any clarification or a pointer in the right direction would be much
appreciated.

thanks

Winger
 
J

John Spencer

Winger,
I'm sorry, but I don't think this will help you solve your problem.

Parameters are not fields.

They can be thought of as objects (or variables) that will get a value from
the user typing into a request box or from a user setting a control on a
form - a textbox or a combobox or a simple listbox.

Perhaps you would like to post your problem in a bit more detail. Then I or
someone else can respond.
 
G

Guest

John,

I think I've sussed it.

I was using a crosstab to generate the first and last dates and this was
messing up my parameter query.

I'm now using Min / Max functions from the Totals bar and my parameter query
now works fine. A learning curve for me.

thank you for your time on this.

Regards

Winger
 

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