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

populating a combo box in vb from access

Status
Not open for further replies.

rundmc

Programmer
Jan 16, 2003
15
US
have a combo box and want to fill it from a field in a database

any help please !
 
You can use databound comboboxes or you can iterate through the recordset and add the fields to the combobox.
Greetings,
Rick
 
Here is a little example using ADO. Good luck.
If adGate.Recordset.EOF = False Or adGate.Recordset.BOF = False Then
Do Until adGate.Recordset.EOF
If adGate.Recordset("fldReconciled") = False Then
cboDays.AddItem CStr(adGate.Recordset("fldDate")) & " " & adGate.Recordset("fldShift")
End If
adGate.Recordset.MoveNext
Loop
adGate.Recordset.MoveLast
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top