non-specific parameters

M

Matt

I am putting together a small database and need assistance with some
parameters. I need to be able to allow users to pull certain records, but
the formal names are pretty cumbersome. So, rather than returning no records
if someone gets close but not exact, I would like to set the parameter of the
query to give me a "close enough" match. For example, instead of having to
remember the full name of Harmony House RTF, I would like to be able to enter
"Harmony", "Harmony House", etc. The trouble is, I don't know the exact
nicknames staff may have for each facility. My field name is "Facility" by
the way.
 
A

Allen Browne

Include wildcards with your paramater, and use Like.

For example, if you have this as the parameter in the Criteria row under
your Facility field in query design:
[WotName]
change it to:
Like "*" & [WotName] & "*"

Alternatively, if you want a fuzzy-logic match, you could use something like
Soundex():
http://allenbrowne.com/vba-Soundex.html
 
J

Jeff Boyce

Matt

One approach might be to use a textbox to hold their "guess", a listbox to
show the entries that contain their guess, and a second listbox that has the
record(s) that relate to the first listbox choice. Or maybe you don't have
that many levels of categorization, and could get by with a single listbox
to show what it found "so far"...

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

KARL DEWEY

The trouble is, I don't know the exact nicknames staff may have for each
facility.
Best to not let them enter the data by typing it but only choose from combo
box the exact name to be used.
You can include some of the most common 'nicknames' like this --
ID Key Nickname
1 Brentwood Brent
1 Brentwood Brent House
1 Brentwood House of Brent
2 Crestor Crestor
2 Crestor Crester
2 Crestor Crestest
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top