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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Navigation in List Boxes

Status
Not open for further replies.

policechiefwiggum

Programmer
Mar 19, 2006
48
GB
Hi All,

I have a query that connects to a SQL server and pulls back some data (obviously!) The query pulls back over 2000 results, which is fine as i can navigate through this using the Navigation buttons in the query.

I've then got a form which has a List box, that displays this query.
What i plan to do is have a couple of fields below the listbox that the user will be able to populate based on the value selected in the listbox.

Now i obviously can't expect the users to scroll though all 2000 records to find the one the want, so was wondering if it possible to:
a)use the standard navigation to jump to records in the list box
or
b) "Easily" add navigation to the list box?

Thanks

Pete
 
you could add a textbox above or below the listbox and do a filter as you type thing: You type "M" and it filters the list to all records starting with "M" then you type "Ma" and returns only the records beginning with "Ma". You could also do a keypad of command buttons above or below. Then press M and it filters to M records. But the listbox does not have a auto find feature built in like the combo box would (or at least I do not think).
 
How are ya policechiefwiggum . . .

[blue]MajP's[/blue] suggestion of [blue]find as you type[/blue] is the way to go. This can easily be done by changing the [blue]Where[/blue] clause of the query used for the [blue]row source[/blue] and requering the listbox.

[blue]Your Thoughts? . . .[/blue]

See Ya . . .

Be sure to see FAQ219-2884 Worthy Reading! [thumbsup2]
Also FAQ181-2886 Worthy Reading! [thumbsup2]
 
Thanks TheAceman1 & Majp

Searching as you type is what I initially wanted to do, but what I've ended up doing is having an IF statement that runs query 1 if the text box is numeric (using a unique reference column in the query) or runs query 2 (using a text column) because i want o run these 2 different queries i decided to put a button in place to kick off the search
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top