Creating a Search in Access

uscalumts

Junior Member
Sep 30, 2004
7
0
0
I am wanting to create a Free Text query in MS Access for a database I created. I have tried using LIKE with no sucess. The idea is to create a query that will search through a database to look for a specific word or one similar (if I ented NEED would return NEED, NEEDED, NEEDS). If any one has a suggestion please let me know. Thanks.
 

KLin

Lifer
Feb 29, 2000
30,427
745
126
Originally posted by: WannaFly
Originally posted by: KLin
Originally posted by: WannaFly
LIKE 'NEED%'
% is the wildcard

* also works as a wildcard.

isnt * just for one character where as % is for many?



* Matches any number of characters. It can be used as the first or last character in the character string.

wh* finds what, white, and why

? Matches any single alphabetic character. B?ll finds ball, bell, and bill

[ ] Matches any single character within the brackets. B[ae]ll finds ball and bell but not bill

! Matches any character not in the brackets. b[!ae]ll finds bill and bull but not ball or bell

- Matches any one of a range of characters. You must specify the range in ascending order (A to Z, not Z to A). b[a-c]d finds bad, bbd, and bcd

# Matches any single numeric character. 1#3 finds 103, 113, 123

To find such things as field values, records, or file names in a Microsoft Access project, or in a Microsoft Access database that uses Microsoft SQL Server-compatible syntax, use the following ANSI-92 wildcards.
----------------
Note If you are using the Find and Replace dialog boxes in an Access project or in an Access database that uses Microsoft SQL Server-compatible syntax, you must use the Microsoft Jet SQL wildcards.
----------------
Character Description Example
% Matches any number of characters. It can be used as the first or last character in the character string. wh% finds what, white, and why

_ Matches any single alphabetic character. B_ll finds ball, bell, and bill

[ ] Matches any single character within the brackets. B[ae]ll finds ball and bell but not bill

^ Matches any character not in the brackets. b[^ae]ll finds bill and bull but not ball or bell

- Matches any one of a range of characters. You must specify the range in ascending order (A to Z, not Z to A). b[a-c]d finds bad, bbd, and bcd
 

uscalumts

Junior Member
Sep 30, 2004
7
0
0
On thing I forgot to mention is with this query I need to use parameters. I want to be able to request a search word and it run through and look it up. An example of what I have been trying to use (with no results coming up) is:

Like "*[Enter Search]"

Any help is appreciated.