talytech
03-30-2012, 09:59 AM
I am trying to display column headers in a combo box that is on a UserForm called from a button. Is that possible?
Currently, I am able to add items to the drop down (combo box) but I can't get it to display the column headers. Here's what I have:
rstSpan.MoveFirst
I = 0
cboDirectory.ColumnWidths = "0 in;1 in;1 in;1 in;1 in;1 in"
cboDirectory.ColumnHeads = True
Do While rstSpan.EOF = False
cboDirectory.AddItem
cboDirectory.List(I, 0) = (rstSpan.Fields("userID_hidden").Value)
cboDirectory.List(I, 1) = (rstSpan.Fields("Lname").Value)
cboDirectory.List(I, 2) = (rstSpan.Fields("Fname").Value)
cboDirectory.List(I, 3) = (rstSpan.Fields("userID").Value)
cboDirectory.List(I, 4) = (rstSpan.Fields("EmpID").Value)
cboDirectory.List(I, 5) = (rstSpan.Fields("Type").Value)
I = I + 1
rstSpan.MoveNext
Loop
Is there something I'm doing wrong?
Currently, I am able to add items to the drop down (combo box) but I can't get it to display the column headers. Here's what I have:
rstSpan.MoveFirst
I = 0
cboDirectory.ColumnWidths = "0 in;1 in;1 in;1 in;1 in;1 in"
cboDirectory.ColumnHeads = True
Do While rstSpan.EOF = False
cboDirectory.AddItem
cboDirectory.List(I, 0) = (rstSpan.Fields("userID_hidden").Value)
cboDirectory.List(I, 1) = (rstSpan.Fields("Lname").Value)
cboDirectory.List(I, 2) = (rstSpan.Fields("Fname").Value)
cboDirectory.List(I, 3) = (rstSpan.Fields("userID").Value)
cboDirectory.List(I, 4) = (rstSpan.Fields("EmpID").Value)
cboDirectory.List(I, 5) = (rstSpan.Fields("Type").Value)
I = I + 1
rstSpan.MoveNext
Loop
Is there something I'm doing wrong?