Click to See Complete Forum and Search --> : import access data into excel


jason_markley
June 18th, 2001, 12:32 PM
How can i (in vba code) access the records of a table, and then display them in a combobox on an excel sheet? I know there has to be a very easy way to do this, anybody out there know what it is?

thanks.

-Jason

Ghost308
June 18th, 2001, 12:42 PM
Use the Data Access control (kinda primitive, but it works for this) to access your db file. make sure that your recordsource field on the data control points to the right table. create a combo box and set its datasource to the data control and make sure it points to the field you want listed in the combo box.

Another way might be to load the db file with a data control (once again, its primitive but it works) and search through it using methods of the data control to do Combo1.AddItem Data1.Recordset.Fields("MyFavoriteField") or something similar.