Populating a combo box - TechRepublic
General discussion
July 23, 2001 at 03:35 PM
craig shepherd

Populating a combo box

by craig shepherd . Updated 24 years, 10 months ago

I’m using vb6 with an ADODC control.

When the following code is run it comes up with an error saying
Field ‘tblStock.Supplier’ cannot contain a zero length string.

With adoStock.Recordset
cboSupplier.Clear
While Not .EOF
cboSupplier.AddItem .Fields(“Supplier”)
.MoveNext
Wend
End With

It breaks on the .MoveNext line.
All I’m trying to do is put the results in a combo box.

This discussion is locked

All Comments