PDA

Click to See Complete Forum and Search --> : Adding an ADODB-recordset to a combobox


Deju
Aug 28th, 2000, 02:37 AM
How can I add a recordset to a combobox?


Thanks

Paylo
Aug 28th, 2000, 05:03 AM
You can't technically add a recordset to a combobox, but if you have the name of the recordset (the table?) then you can put the name of the table inside the combobox. When the user selects it you will need to run a query to load that recordset up based on the name in the combobox.

Remember Combo boxes are used to store strings. :)

Francis.

kovan
Aug 28th, 2000, 08:46 AM
if you mean content of a recordset
here it goes

with RS
while not .eof
cboBox.AddItem !MyField
.moveNext
wend
end with

666539
Aug 28th, 2000, 09:02 AM
Try using a data combo box. Set the recordsource property = to the recordset name. Set the listfield property = to the recordset field you want to populate the recordset with.