Need headings in listbox to become rows in another listbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need the column headings in a listbox to become the rows in another listbox so I can set up a sorting specification window. How do I do this?
 
Hi David,

the headings of a listbox are columns of the first row

Luck
Jonathan
-----Original Message-----
I need the column headings in a listbox to become the
rows in another listbox so I can set up a sorting
specification window. How do I do this?
 
I need the column headings in a listbox to become the rows in another listbox so I can set up a sorting specification window. How do I do this?

Use a Combo Box.
Set the Row Source Type to Field List.
Set the Row Source to the query name.
 
Hi david,

he's a code example:

Private Sub Form_Load()
Dim strFields As String
Dim intCol As Integer

With List0
For intCol = 0 To .ColumnCount - 1
strFields = strFields & .Column(intCol, 0)
& ";"
Next intCol
End With

If Len(strFields) > 0 Then
' remove extra semicolon
strFields = Left(strFields, Len(strFields) - 1)
End If

Combo2.RowSource = strFields
' rowsource is set to value list
End Sub


Luck
Jonathan
 
Back
Top