returning similar values

C

cherrynich

I have a form that I run queries off of, I have a box where the user enters a
technician's name and it returns the matches. I want to allow for typos
somehow. Is there an easy way to do this? If anyone has any idea about how
to do this or anything similar please let me know!

thanks
nick
 
D

Douglas J. Steele

One possibility would be to implement Soundex. Access doesn't have it
built-in, but do a search in Google on Soundex and you'll get lots of hits.
 
J

John Vinson

I have a form that I run queries off of, I have a box where the user enters a
technician's name and it returns the matches. I want to allow for typos
somehow. Is there an easy way to do this? If anyone has any idea about how
to do this or anything similar please let me know!

Douglas' suggestion of using Soundex is one way to do this; another is
to have a Combo Box control which displays a list of all the
technicians. This will let the user select a name known to be valid
from a list, rather than having to type it all in.

Use a criterion like

=Forms!nameofform!nameofcombo

and make sure that the combo box is *unbound* (it should have nothing
in its Control Source property).

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
M

Mike Labosh

I have a form that I run queries off of, I have a box where the user enters
a
technician's name and it returns the matches. I want to allow for typos
somehow. Is there an easy way to do this? If anyone has any idea about
how
to do this or anything similar please let me know!

Here are a couple things that I have done in the past that might help:

1. Use a ComboBox where the RowSource is something like this:

SELECT TechnicianID, FullName FROM Technicians ORDER BY FullName

This way, the user can see the names, and visually avoid typos

2. Whatever the user types, use it in a WHERE clause like this:

"SELECT * FROM Technician WHERE FullName LIKE '*" & fullName & "*'"

This way, whatever the user types will return all records where the full
name contains what they typed.

3. Teach the users about how the LIKE operator syntax works and let the
users enter the LIKE expression, and then you use it like this:

"SELECT * FROM Technicians WHERE FullName LIKE '" & pattern & "'"

4. If you can get the data into a SQL Server, SQL Server 2000 has a
SOUNDEX() function that you can use in an Access Pass-Through query.
--
Peace & happy computing,

Mike Labosh, MCSD

"It's 4:30 am. Do you know where your stack pointer is?"
 
Top