Auto Complete on Query Prompt

bennybee

Registered User.
Local time
Today, 22:59
Joined
Jan 13, 2004
Messages
50
Ok heres another one for you.

I have a pop up box that comes up when i run my query asking for a venue name. is there a way that i can type the first few letters of the name, and then get it to autocomplete the name (maybe look up the value from a table), or use the * button to complete the name.

so instead of having to type
Italian Sports and Social Club Inc

I can type Italian* and it will know to look up the values associated with the Italian Sports and Social Club, or it will auto complete the name in the pop up box..

any ideas?

BB
 
BB,

What you need is to use the Like operator in SQL.

If you wanted to compare a field against a textbox (txtSearch)
in a form (frmMain). You can have the criteria in the query's
field be: Like Forms![frmMain]![txtSearch]

That way the user is responsible for putting in the "*".

Or you can put: Like "*" & Forms![frmMain]![txtSearch] & "*"

That way the user types in no asterisks.

If you mean that what they type in points you to which field
to use as criteria, then that requires a different approach.

Wayne
 
If you want to base the prompt on the intitial letters of the user input, use a combo box. This homes in on the values as you type and is easy to implement.
 

Users who are viewing this thread

Back
Top Bottom