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

Combo box shows only 65,335 rows

Status
Not open for further replies.

Nacar

Technical User
Dec 21, 2004
21
0
0
US
Hello everybody,
I need your help in this issue, please.
I have a combo box, based in a query, with 163,000 records. They are names. The form shows me all. I added a combo box but it shows me only until 65,335 records. Why?
And how can fix that?
Thanks a lot.
 
Nacar,

While Applecore99 tells you how to do this, I have to agree with the author of that site; this is a very poor idea. Searching thru 65k names isn't really practical, much less 16k! You really need to have a textbox with a search function attached. The object of all programs/applications is to make life easier for the users! It would be easier, user-wise, to flip thru a hardcopy printout than use a combobox for this purpose!

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Thanks for your answers, and I agree, the application is for make life easier.
What I am trying to do is to put a Find tool in the form, then the user only has to type the first letter in the combo box and then click the arrow to find a particular name.
Now I need more help on the syntax, please!!!!
I have this from the Applecore99
Private Sub Form_Current()
Dim strSQL As String
If Not IsNull(Me!PATIENT_ID) Then
strSQL = "SELECT tblIBSPatients.PATIENT_ID, [P_LNAME] & , & [P_FNAME] AS Patient" _
& " FROM tblIBSPatients" _
& " WHERE Patient_ID =" & Me!PATIENT_ID
Me!Combo31.RowSource = strSQL
Else
Me!Combo31.RowSource = ""
End If
Combo31 = PATIENT_ID
End Sub
Private Sub Combo31_AfterUpdate()
Dim strSQL As String
If Len(Me!Combo31.Text & "") >= 4 Then
strSQL = "SELECT tblIBSPatients.PATIENT_ID, [P_LNAME] & , & [P_FNAME] AS Patient" _
& "FROM tblIBSPatients" _
& "WHERE tblIBSPatients.PATIENT_ID <> '-' AND tblIBSPatients.PATIENT_ID LIKE '" & Combo31.Text & "*'" _
& "ORDER BY [P_LNAME] & , & [P_FNAME];"
Me!Combo31.RowSource = strSQL
Else
Me.Combo31.RowSource = ""
End If

But there are something wrong in the syntax. Thanks a lot again.
 
I think the only way to do that is by requerieng the form after each keystroke. I can't imagine that this is any good on performance. Why not do this after all the char's have been entered? Your user interface will feel better this way.

easyit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top