Article ID: 130333
Article Last Modified on 1/19/2007
Ascending Case-Sensitive
Order Order
--------------------------
a A
A B
B C
b D
c a
C b
D c
d d
To sort records in case-sensitive order, follow these steps:
Table: Sorting Test
-------------------
Field Name: Test
Data Type: Text
b
d
B
A
D
a
C
c
Option Explicit
Function StrToHex (S As Variant) As Variant
'
' Converts a string to a series of hexadecimal digits.
' For example, StrToHex(Chr(9) & "A~") returns 09417E.
'
Dim Temp As String, I As Integer
If VarType(S) <> 8 Then
StrToHex = S
Else
Temp = ""
For I = 1 To Len(S)
Temp = Temp & Format(Hex(Asc(Mid(S, I, 1))), "00")
Next I
StrToHex = Temp
End If
End Function
Query: CaseSensitive Sorting Test
---------------------------------
Type: Select
Field: Test
Sort: not sorted
Show: True
Field: Expr1: StrToHex([Test])
Sort: Ascending
Show: FalseKeywords: kbhowto kbprogramming kbusage KB130333