Query asks for parameter with no connection to the query.

P

Phil Smith

I have a query. Below is the SQL for that query. It joins six tables,
all ODBC.

When I run it, I get a dialog box titled "Enter Parameter Value" asking
for the value of Query18.Expr1

Query18 does not have anything whatsoever to do with this query. It
also does not have a field called Expr1.

Note. I can get the query to work if I change "AS Expr1" to "AS
NewDivision"

Now, this is not a problem, as Expr1 is obviously less specific then
NewDivision, but I am wondering what might cause such a bug? I have
perfomed a Compact and Repair, to no avail. Access 2003 SP2.







SELECT invoice_d.item_id, invoice_d.ship_qty, brand.name AS Brand,
item_types.name AS ItemType,
IIf(division!name="Apparel","Apparel",IIf(item_types!name="Surf","Surf",IIf(item_types!name="snowboards"
Or item_types!name="bindings","Snow","Skate"))) AS Expr1
FROM division INNER JOIN (brand INNER JOIN (item_types INNER JOIN (item
INNER JOIN (invoice_d INNER JOIN invoice_h ON invoice_d.invoice_id =
invoice_h.invoice_id) ON item.item_id = invoice_d.item_id) ON
item_types.type_id = item.item_type) ON brand.brand_id = item.brand_id)
ON division.division_id = item.division_id
WHERE (((brand.name)="Santa Cruz"));
 
O

OfficeDev18 via AccessMonster.com

Phil,

Maybe experiment a little: rename Query18 temporarily and then run your query
and see what it does.

Sam
 

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