Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2007

Tip: Looking for answers? Try searching our database.

Parameter Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TAWise - 18 Jul 2007 13:44 GMT
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.
Ofer Cohen - 18 Jul 2007 14:28 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.