Click to See Complete Forum and Search --> : ComboBox


Drew
March 30th, 2001, 08:30 PM
I have made a database program with the VB wizard. I have one record with three fields in it.
I want to be able to put one of the fields into a combo box. Can someone tell where to start?

vivek_29
March 30th, 2001, 09:19 PM
Hi there.

I am assuming that you have fetched the recorset and the name of you recordset is 'rs'

So you will create a loop

Do while not rs.eof
combobox.additem(rs("column name"))
rs.movenext
loop

Drew
March 30th, 2001, 09:32 PM
Thanks!! I found the rs in another program. Here is the code.

Public WithEvents rs As ADODB.Recordset

Private Fields As ADODB.Fields
Private fld As ADODB.Field

Set fld = Fields(cboName.Text)
ShowProperties

This did not work and I do not understand any of the code.