Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Look Up Dialog using Listbox

Status
Not open for further replies.

dfhainsd

Technical User
Feb 11, 2001
21
I would like to enter a contacts last name in a textbox and have the listbox respond like the combobox does when you enter charactors into it?
Any suggestions...

Thanks in advance

Domonic
domonic@dfha.com
 
Hi,

I think what you are asking is for the list to do an incremental search as the user types in values, so that entering 'br' finds all list values starting with 'br'*

Sorry, but amoung the 4 key differences between combos and lists is that functionality (others being size, only-from-list, and multiple selections). To move through the list, the user can keep using the starting letter to iterate through the values (eg first 'b' gets first entry starting with 'b', 2nd 'b' gets second & so on).

If you needed to, you could have a 'search' field which the user enters data to filter the list as they type. This would need some minor coding, to requery the list as the search field is populated.

Cheers
 
Yes that is the way I would like to go. Any suggested code??
I figure i would use the on change event.

domonic
 
Hi,

I thought of the solution 2 secs after posting the reply. doh!!

The list needs to be based on a query. The filter needs to include:
forms![yourForm]![yourTextBox].text & "*"

The control (yourTextBox) needs to requery the list on change events. Note the 'text' member after the control name (forms![yourForm]![yourTextBox]). This will pick up the current value and the * will get all values.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top