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

Setting up Query for ONE name field

Status
Not open for further replies.

incognito

Technical User
Feb 1, 2001
8
US
I now have it set to where i have only one name field, and have the query searching for that name.I tried 20 different ways of typing it in the critera to have, for example: john farmer in the field, entering farmer in the box and it include that record. If i only type the last name, that's all that comes up. I have to type the full name, which i do not wnt to do. What should i put in the Criteria? Something like *[Enter Name]* ??
 
If I understand what you are trying to do the above should have worked. Please post the sql from the query so I can get a better feel for what you are trying to do. Thanks
 
SELECT Addresses.Name, Addresses.Address, Addresses.CityStateZip, Addresses.Phone, Addresses.DemoPerson, Addresses.DemoDate, Addresses.Purchased, Addresses.Notes
FROM Addresses
WHERE (((Addresses.Name)="*" & [Enter Name] & "*"));
 
Need to use like in there as well

Like "*" & [Enter Name] & "*"

sql will look like

SELECT Addresses.Name, Addresses.Address, Addresses.CityStateZip, Addresses.Phone, Addresses.DemoPerson, Addresses.DemoDate, Addresses.Purchased, Addresses.Notes
FROM Addresses
WHERE (((Addresses.Name)Like "*" & [enter name] & "*"));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top