Re: Query asks for parameter with no connection to the query.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Phil,

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

Sam

Phil Smith wrote:
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"));

--
Sam

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200612/1

.



Relevant Pages

  • RE: Select Query to create a Total field
    ... related form to show the results of Expr1: as a column or field in both. ... Do I have to close and rerun the query or will the ... You generally don't want to store a value that can be calculated. ... The query works and returns the totals I require in a column Expr1. ...
    (microsoft.public.access.queries)
  • Re: To Crosstab or not to crosstab
    ... Duane Hookom ... MS Access MVP ... Remember I want Expr1, Expr2... ... to be values in the crosstab query ...
    (microsoft.public.access.queries)
  • Re: Append query with addtional fields
    ... Expr1: isIncrement ... it doesn't matter which field you use in the function argument, ... for the whole append action, which is what was happening in your query. ...
    (microsoft.public.access.queries)
  • Compare results of two expressions within query
    ... I can display the results in the query in two columns without a problem. ... What I would like to do is, in the same query, have a single column that combines these answers, using a third If expression, and not show the results of the first two: ... I'm looking into doing Expr1 and Expr2 within a subquery of ExprTotal, but not sure if this would work. ...
    (microsoft.public.access.queries)
  • Re: Line Numbering
    ... EXPR1: SELECT expression1, expression2 ... returns 2 expression into ONE field, EXPR1. ... ToteNumber OrderNumber LineNum ... When I try to run the query, I get the error message that I am missing ...
    (microsoft.public.access.queries)