When you say it won't put the vendor name in, do you mean
-- you don't see it in the drop down list or
-- that even if you type it in the combobox it is not displayed after you
leave the combobox
-- or that you are trying to get the value for the column displaying Vendor
and put that into another control and you get an error
Some things to try to help diagnose the problem.
-- Add an order by clause to the SQL statement so the records are in order.
Try typing in the selection value associated with the last record in the
comboboxes query. If that works and displays the value, then the combobox
is not fully loading all the records.
-- Try dragging the selection box to the bottom of the scroll bar, let loose
and drag it again. Does that increase the number of vendors displayed? If
so then the combobox is not fully loading all the records.
If one of the above is true, you should be able to fix this problem with a
bit of code to force the combobox to fully load. Basically, you will need
to a statement like the following in the form's module. You could place the
code in the combobox's GotFocus event or in the Form's current event or ???
Dim LRowCount as Long
LRowCount = Me.ComboboxName.ListCount
That usually forces the combobox to load fully.
SandyR said:
I took all but one of the address fields out, and it did speed up the
loading, but it still won't put the vendor name if it is not in the first
1600 records of the table
John Nurick said:
Hi Sandy,
If you're using the SQL below as the RowSource of a combobox, you'd do
better to omit the address fields and just use
SELECT Vendor.[#VEND], Vendor.VENDOR FROM Vendor
to reduce the amount of data needed to load the combobox. Then when the
user selects a vendor, use the #VEND value from the combo to retrieve
the other fields from the table.
For a way to handle very long lists with a combobox, see
http://allenbrowne.com/ser-32.html
On Tue, 9 May 2006 11:19:03 -0700, SandyR
I am trying to use a query against a table with 6000 records in a combo
box.
It takes a long time for the combo box to load, and if I select a record
not
in the first one fifth of the file, the name doesn't appear in the combo
box.
Is there a better way that I should be doing this?
My query is as follows: SELECT Vendor.[#VEND], Vendor.VENDOR,
Vendor.[1ADDR], Vendor.[2ADDR], Vendor.[3ADDR], Vendor.[4ADDR]
FROM Vendor;