Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Case Sensitivity 2

Status
Not open for further replies.

GGleason

Technical User
Mar 22, 2001
321
US

When I group a field, two records show up as identical. For example:

ABC_MM
ABC_mm


Is there a switch that takes into account case sensitivity?

TIA,
GGleason
 

I don't know of a switch or option. You can write a function and use the function in an Group By clause.

Function:
Public Function StringToAsciiValue(strIn As String) As String
Dim i As Integer, strOut As String

For i = 1 To Len(strIn)
strOut = strOut & Asc(Mid(strIn, i, 1))
Next i

StringToAsciiValue = strOut
End Function

-------------------------------------

Query example:
SELECT FieldName
FROM Emps
GROUP BY
FieldName,
StringToAsciiValue([FieldName]); Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Terry,

What a clever solution! It's working fine.

Thanks,
GGleason

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top