Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Problem

Status
Not open for further replies.

lm0304

Technical User
Jan 16, 2002
12
0
0
US
I have a report that asks the user to type in a "customer" to run this report for. If the database has customer "XYZ", "XYZ International" and XYZ Corporation, how and where do I tell Access that if the user types in just XYZ as the customer to run the report for to pull ALL XYZ customers (e.g. XYZ*).

Thanks in advance to anyone who can help.
 
If you're doing this via a paramter query you almost answered your own question....

In the criteria line for customer column you probably have:

[Enter customer: ]

Replace with:

like [Enter customer: ] + "*"

or:

like "*" + [Enter customer: ] + "*"

if you want to match, eg XYZ, anywhere in the customer name. Good Luck,
Mike T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top