I have a rather clumsy workaround that may work for you.
I created a User Defined Function in VBA that converts any string to a series of its ASCII value representations (so "A" is 65 and "a" is 97). So, if for the purposes of this query, we convert the Username field using this function and group on that, it should give you what you want.
So, the VBA code for that function looks like:
Code:
Function ASCIIVal(myString As String) As String
Dim myASCIIStr As String
Dim myLen As Long
Dim i As Long
myLen = Len(myString)
If myLen > 0 Then
For i = 1 To myLen
myASCIIStr = myASCIIStr & Asc(Mid(myString, i, 1)) & "-"
Next i
ASCIIVal = Left(myASCIIStr, Len(myASCIIStr) - 1)
End If
End Function
and your query would look like:
Code:
SELECT ASCIIVal(Contactsmultipleaccounts.[Contact ID]) as AscID, First(Contactsmultipleaccounts.[Contact ID]) as ContactID, Count(Contactsmultipleaccounts.[Account ID]) AS [CountOfAccount ID]
FROM Contactsmultipleaccounts
GROUP BY ASCIIVal(Contactsmultipleaccounts.[Contact ID])
ORDER BY Count(Contactsmultipleaccounts.[Account ID]) DESC;