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

Selecting items from very long look-up list

Status
Not open for further replies.

doctorswamp

Technical User
Jul 15, 2003
133
GB
Hi

Have simple continuous form to create a pick list. One combo field looks up products from a list of about 5000 items.

Even though the combo homes in as letters are typed there is still a lot of typing needed to identify the target product. This is because many products have the same 10 to 15 characters to start, then have different endings.

It would be great if in adding a new item the combo remembered what was typed in the previous entry, as the picklist is built alphabetically.

Thanks as ever
 
No takers on this onebut I have found asort of way round.

This is to use a list box instead of the combo box. The long list still meant lots of scrolling since there are 7500 records, but adding an option group with the letters A to Z at least gets it to jump to the right block.

It warned that an option group can't have more than 20 entries but happily accepts the extra 6 added manually.
 
As per your original request, maybe
Code:
Private mstrLastPicked As String

Private Sub cboPicked_AfterUpdate()
    mstrLastPicked = Nz(cboPicked,"")
End Sub

Private Sub cboPicked_Change()
    'If what the user has typed starts with same letter as what was last picked, jump
    'to the last picked item automatically
    If Len(mstrLastPicked) > 0 Then
        If Left(mstrLastPicked, 1) = Left(cboPicked.Text, 1) Then
            cboPicked = mstrLastPicked
        End If
    End If
End Sub

An idea, maybe make two dropdowns. Dropdown #1 has the first 10 characters, dropdown #2 has remaining. When item picked from #1, #2 is requeried to filter for appropriate values.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top