Re: how to bound combobox ?
I haven't been able to bind a combo box to a recordset and have the combo box populate, I always have to do it manually. Ie...
Function FillComboBox(cboMain as ComboBox, rs as ADODB.Recordset, sFieldName as string) as Boolean
on error Goto ErrorHandler
While Not rs.EOF
cboMain.AddItem rs(sFieldName)
rs.MoveNext
Wend
FillComboBox = true
Exit Function
ErrorHandler:
MsgBox error
End Function
You can call this function and just pass it your combo box contro, the recordset and the name of the field to put into the combo box and it will do it for you.
Hope this helps,
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
Re: how to bound combobox ?
thanks for the reply
by the way, that's actually what i do for the moment as i can't still find out how to do it automatically ;)
Re: how to bound combobox ?
I am not sure of prior versions of vb but with vb6 there is a datacombo control, simular to the combobox, that can be bound to the database.
d.paulson