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

preloading information from table in combo box

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
greetings!

I would like to know if there is anyway of preloading a combo box with records in a table. I have a combo box set up with a SQL statement pointing to records in a table and this table has around 30000 records, which means everytime someone goes to use it, it has to run this query that takes way too long. I would like to know if I can run the query and/or fill the items in the combo with data BEFORE the person clicks on it?
 
Try this:
In your forms "Load" event in VB type:
Dim LgCount As Long
LgCount = Me![NameOfCombo].ListCount

This forces Access to get all rows at that event, not wait 'till someone uses the combo. Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top