Hello Friends,
Hope everyone is doing well!
I have a listbox on a form that displays data from a ADO recordset. How do we change the order of the columns on the list box? They seem to be ordered alphabetically.
Here is the code
The columns on the listbox are ordered alphabetically. I am wondering how can I change the order of these columns on the listbox.
Thank you!
Allan
Hope everyone is doing well!
I have a listbox on a form that displays data from a ADO recordset. How do we change the order of the columns on the list box? They seem to be ordered alphabetically.
Here is the code
Code:
Dim rs1 As New ADODB.Recordset
Set rs1 = New ADODB.Recordset
rs1.Open "SELECT ID, employee, department FROM [employees] WHERE ID = " & employeeID & ", CurrentProject.Connection, adUseClient, adLockOptimistic, adCmdText
If rs1.RecordCount > 0 Then
Set Me.resultTable.Recordset = rs1
End If
rs1.Close
The columns on the listbox are ordered alphabetically. I am wondering how can I change the order of these columns on the listbox.
Thank you!
Allan