gerard1979
MIS
I build a query in the wizard (access2002)
I filled a listbox with the columns of the query
I also filled a combobox with the names of the columns, see below:
Public Sub VulsorteerLijst()
Dim intNumColumns As Integer, intI As Integer
Dim strSQL As String, frm As Form
Set frm = Forms!frmLogboekGewRec
intNumColumns = frm!lstLogboek.ColumnCount
strSQL = ""
For intI = 0 To intNumColumns
strSQL = strSQL & frm!lstLogboek.Column(intI, 0) & ";"
Next intI
frm!cboSort.RowSource = strSQL
End Sub
But now I want to do the following trick:
in the afterUpdate_event of the combobox I want to Order the columns ASC on the selected column. But I'm not using the recordsource property but only the listbox.requery
can u order in this way?
Thnx in advance,
gerard
I filled a listbox with the columns of the query
I also filled a combobox with the names of the columns, see below:
Public Sub VulsorteerLijst()
Dim intNumColumns As Integer, intI As Integer
Dim strSQL As String, frm As Form
Set frm = Forms!frmLogboekGewRec
intNumColumns = frm!lstLogboek.ColumnCount
strSQL = ""
For intI = 0 To intNumColumns
strSQL = strSQL & frm!lstLogboek.Column(intI, 0) & ";"
Next intI
frm!cboSort.RowSource = strSQL
End Sub
But now I want to do the following trick:
in the afterUpdate_event of the combobox I want to Order the columns ASC on the selected column. But I'm not using the recordsource property but only the listbox.requery
can u order in this way?
Thnx in advance,
gerard