benjamin.grimm
Registered User.
- Local time
- Yesterday, 18:16
- Joined
- Sep 3, 2013
- Messages
- 125
Hello togehter
i sort by the following code the query: 2_geplannt_CC_500_TG_Kreuztabelle
Now i want to sort more queries:
Acutally 20 more.
How can i do it that it is working?
greetings benjamin
i sort by the following code the query: 2_geplannt_CC_500_TG_Kreuztabelle
Code:
Dim rs As DAO.Recordset
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim intPos As Integer
Dim strSort As String
Set rs = CurrentDb.OpenRecordset("QSort", dbReadOnly, dbForwardOnly)
Do Until rs.EOF
strSort = strSort & ",""" & rs(1) & """"
rs.MoveNext
Loop
strSort = "(" & Mid(strSort, 2) & ")"
Set qdf = CurrentDb.QueryDefs("2_geplannt_CC_500_TG_Kreuztabelle")
intPos = InStrRev(qdf.SQL, "In")
qdf.SQL = Left(qdf.SQL, intPos + 1) & strSort & ";"
rs.Close
qdf.Close
Set rs = Nothing
Set qdf = Nothing
Set db = Nothing
Now i want to sort more queries:
Acutally 20 more.
How can i do it that it is working?
greetings benjamin