Closest match searches

Sam Summers

Registered User.
Local time
Today, 23:07
Joined
Sep 17, 2001
Messages
939
Hi,

I am trying to allow users to search for items by typing only the letters or numbers that they can read on an item into a text box in order to find all items that have the closest possible match.
The users input from the text box is used to open a viewing form that uses a query that refers to the input text box

i.e. Forms![ItemSearch]![inputBox].[Text]

So therefore if all that can be read on the item is :
(blank) R (blank) S1 (blank) 2 when the actual number is HRS112

How can I find all items that are close to this?

Can I use wildcards to fill in the blanks and if so how do I enter this expression in the search criteria of the Query?

I would be very grateful if someone could help me.

Thank you
 
Sam,

When you enter the criteria into the query use :

Like "H?S1??"

which will return

HRS112
HQS194
H2S1L5

etc

If you are using a textbox to get the data from, use:

like Forms![ItemSearch]![inputBox]

and use the ? wildcard in the textbox.

There are other wildcards you can use, just search for "wildcards" in Microsoft Access Help.

Dave
 

Users who are viewing this thread

Back
Top Bottom