Manufacturing Information Solutions Forum Index Manufacturing Information Solutions
Your Place for Support and Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Case Sensetive Query

 
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> Microsoft Access
View previous topic :: View next topic  
Author Message
mistux
Site Admin


Joined: 25 Jun 2004
Posts: 1042
Location: South Bend, Indiana USA

PostPosted: Wed Oct 24, 2007 6:47 pm    Post subject: Case Sensetive Query Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> Microsoft Access All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group