I generally put this code snippet in my On Key Down combo box event.
Code:
Private Sub cboLastNameSearch_KeyDown(KeyCode As Integer, Shift As Integer)
Me.cboLastNameSearch.Dropdown
End Sub
It makes for a much easier search of long lists of names, SS numbers etc. A few keystrokes and wala!, their selection is nicely filtered. I have a list of 100,000 names. Here is my rowsource sql.
Code:
SELECT DISTINCT Applicant.Appl_Lname, Applicant.Appl_Fname, Applicant.SSN
FROM Applicant
ORDER BY Applicant.Appl_Lname, Applicant.Appl_Fname;
I've hidden the SSN, but I want to do something with it later and I want the user to start typing the last name till it narrows down on the desired name. When selected the code grabs the SSN and populates the form. The problem is the combo box only displays about half the list, down to the "M"s. If you start to type Smi, you will see Smith in the box you are typing in, but the dropdown will be stuck on Miller.
Is there a limit on the number of names viewable in a combo box?
p.s. Sorry for the mangled post. I've just repaired it. Something about this website has been causing my work PC to crash. Not sure what's causing it. Never happened before I took this job.