mistux Site Admin
Joined: 25 Jun 2004 Posts: 1042 Location: South Bend, Indiana USA
|
Posted: Wed Oct 24, 2007 6:47 pm Post subject: Case Sensetive Query |
|
|
Asuming the data 'Test', 'test', 'TEST' etc is held in a field called MyField in the table MyTable, then the query would be:
You would simply have to paste the following function into a code module:
SELECT MyField, Count(*) AS MyTotal
FROM MyTable
GROUP BY MyField, GetAscString([MyField])
' ************************************************** ***
Public Function GetAscString(varInput) As String
Dim lngCount As Long
Dim strOut As String
If Len(varInput) > 0 Then
For lngCount = 1 To Len(varInput)
strOut = strOut & Asc(Mid$(varInput, lngCount, 1))
Next lngCount
End If
GetAscString = strOut
End Function |
|