-
Hello!
I know that the forms2 combobox can display columns, but I can't get it to work. Here's what would work in an ideal world:
Code:
cboForms2.ColumnCount = 2
Do Until recordset.EOF
cboForms2.AddItem (recordset!COLUMN1, recordset!COLUMN2)
rs.MoveNext
Loop
Now, obviously this does not work, I just make it up. It would work in VB - lcdial Edition, but there is no such thing.
The Help file discusses arrays, but I can't use an array b/c I don't have a recordcount, or maybe my understanding is off, PLEASE HELP ME!!! Thanks in adavnace!
-
...
I See a lot of these questions
but
If u must, you can create
your own quick 2 column listbox
Add 2 list boxes to the form... next to each other so close
that they look like one and
do the same thing
with just a little code u can manage it
-
Try the following Code
Rs.MoveFirst
For i = 0 To Rs.RecordCount - 1
ComboBox1.AddItem Rs("user_name")
ComboBox1.List(ComboBox1.ListCount - 1, 1) = rs("first_name")
' Any No of Columns u can add similarly
ComboBox1.List(ComboBox1.ListCount - 1, 1) = rs("ColumnName")
Rs.movenext
Next