Private Sub List0_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Y <= 225 Then ' you might have to change this - it checks if the pointer is over a column heading
Dim strOrd As String, strSQL As String
If Button = 1 Then strOrd = " Asc;" Else strOrd = " Desc;" 'Left click to sort asc, right for desc
strSQL = "SELECT ...your regular SQL here...ORDER BY "
Select Case x
Case 0 To 1694 ' width of my first column in pixels
strSQL = strSQL & "Logged" & strOrd
Case 1695 To 3389 ' second column
strSQL = strSQL & "Name" & strOrd
Case Else 'third column
strSQL = strSQL & "Issue" & strOrd
End Select
List0.RowSource = strSQL
List0.Requery
End If
End Sub