Here is the String building loop..
Expand|Select|Wrap|Line Numbers
- strSQL = "Case [" & FieldName & "] "
- For z = intFirst To intLast
- strSQL = strSQL & _
- "WHEN " & SortOrder(z) & _
- " THEN " & forCount & " "
- forCount = forCount + 1
- Next z
- strSQL = strSQL & "END;"
Here is the main sql statement.
Expand|Select|Wrap|Line Numbers
- sqlSort = "SELECT * FROM [table1] ORDER BY (" & _
- CustomSort(Sorts(), FieldName) & ")"
If this method is not supported, is there a way to do this in access, without adding a separate identifying column?
I just really want a generic and quick way to do this.