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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompt for input when running a query 1

Status
Not open for further replies.

stacy0966

Programmer
Apr 27, 2004
35
US
Hello,

I have a table with two fields called “Name” and “Address”. I have a query based on this table and these two fields. I have gone in the query design mode and typed [Enter Name] on the criteria line for the “Name” field. I did this so the query would prompt me to enter a name when running. This works fine; however, when I run the query and enter a name I would like to find all records that begin with the name I enter. For example, if I enter “Steve” I would like all records that begin with “Steve” to be found. I know I can go into the query design each time and type “like “*steve*” and it will work but don’t want to have to do this each time. Any help would be greatly appreciated.

Thanks!

 
In the criteria cell:
Like '*' & [Enter Name] & '*'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
This works perfectly. Thanks for the tip. Have a GREAT Day!

Stacy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top