The fact that Access is adding "Expr1: " in front of the field is irrelevant
to your problem. This is by design and does not effect the results.
When you use an expression instead of an actual field name in the field name
cell of query design, Access gives the expression an alias name. In SQL,
this looks like:
Select fldFieldName, (3 * 8) AS Expr1, [Your Parameter] as Expr2,
fldOtherField . . . .
In design mode, the field name cells would have this in them:
Expr1: (3 * 8)
Expr2: [Your Parameter]
You can change the alias to any text you wish (consistent with Access
naming rules); just edit the text to the left of the colon in design mode.
I just tested this SQL and it works fine:
SELECT Table2.orders, Table2.ShipCountry, [Enter the country] AS Expr1
Where [Enter the country] Is Null OR (Table2.ShipCountry =[Enter the
country] AND [Enter the country] Is Not Null);
Paste this into a new query, SQL view, replacing "Table2" with your table
name, and see what happens. If it doesn't work as you expect, tell us
exactly how it does not work, i.e., what you typed in response to the prompt
and what your result was.
>Tried this but Access keeps adding the "Expr1:" in front of the field.
>Any other suggestions.
>> Hrm. Try going into SQL view and editing the WHERE clause to
>> WHERE [Country] = [Enter the country:] OR ([Enter the country:] IS
>> Not sure how that will come out in the grid; maybe you just need to
>> uncheck the display checkbox under Expr1.
>> John W. Vinson[MVP]