D
Doug
I have a combo box on a tab object of an Access 2002 form that contains a lot
of records (30000+). To increase the form speed, I set the original
rowsource for the combo box to only the record bound to that control so only
1 record is retrieved (because it is rarely changed after it is added). If
the user enters the combobox again, I have code in the On Enter event to
select from the DB again for all the records so the user can select any
record they would like.
My OnEnter event is as follows:
Private Sub cbobillclientcode_Enter()
strsql = "SELECT tblClient.clientcode, tblClient.lastname + ', ' +
tblClient.firstname AS client, tblCompany.intname " & _
"FROM tblClient INNER JOIN " & _
"tblCompany ON tblClient.companycode = tblCompany.companycode "
& _
"WHERE tblclient.status = 'Active' " & _
" ORDER BY Client "
Me.cbobillclientcode.RowSource = strsql
End Sub
I would expect the rowsource to change and the combobox to requery but it is
not changing. It still only contains the one record. I have checked the sql
in query analyzer and that works fine.
Any suggestions?
of records (30000+). To increase the form speed, I set the original
rowsource for the combo box to only the record bound to that control so only
1 record is retrieved (because it is rarely changed after it is added). If
the user enters the combobox again, I have code in the On Enter event to
select from the DB again for all the records so the user can select any
record they would like.
My OnEnter event is as follows:
Private Sub cbobillclientcode_Enter()
strsql = "SELECT tblClient.clientcode, tblClient.lastname + ', ' +
tblClient.firstname AS client, tblCompany.intname " & _
"FROM tblClient INNER JOIN " & _
"tblCompany ON tblClient.companycode = tblCompany.companycode "
& _
"WHERE tblclient.status = 'Active' " & _
" ORDER BY Client "
Me.cbobillclientcode.RowSource = strsql
End Sub
I would expect the rowsource to change and the combobox to requery but it is
not changing. It still only contains the one record. I have checked the sql
in query analyzer and that works fine.
Any suggestions?