I have a report based on "customer" field and a parameter query. How can I
set up the criteria for the parameter query so that if the user enters
"government", it will run a report that includes "federal government," "state
government,", etc. or if they enter "state government" they will only get
the information for "state government" as customer.
With the use of a wild card:
If this is your SQL now
Select * From TableName Where customer = [Please select a customer]
Then, with the use of a wild card
==================
Select * From TableName Where customer Like "*" [Please select a customer] &
"*"
Will return all the records that contain the string, any where
====================
==================
Select * From TableName Where customer Like "*" [Please select a customer]
Will return all the records that end with the string
====================
==================
Select * From TableName Where customer Like [Please select a customer] & "*"
Will return all the records that start with the string
====================

Signature
Good Luck
BS"D
> I have a report based on "customer" field and a parameter query. How can I
> set up the criteria for the parameter query so that if the user enters
> "government", it will run a report that includes "federal government," "state
> government,", etc. or if they enter "state government" they will only get
> the information for "state government" as customer.
TAWise - 18 Jul 2007 14:38 GMT
Thank you, thank you. I tried "Like", "=", and everything else I could think
of but totally forgot about &
> With the use of a wild card:
>
[quoted text clipped - 25 lines]
> > government,", etc. or if they enter "state government" they will only get
> > the information for "state government" as customer.