MS Access query returning Chinese characters - possible table corruption?

Here is yet another option, which I just tried successfully. I was updating a query that someone else had created, and the author had included every field in the Group By clause, to return distinct records. I removed the entire Group By clause and inserted DISTINCT right after SELECT. No more Chinese. This may not be possible in some situations, but in this case it was a simple fix.

Also, I would not have thought of this if not for the insights offered above. Thanks everyone!


This is a bug typically met if grouping on a memo field.

There may be several workarounds depending on your needs:

Select 
    a, Left(b, 255) As b
From 
    table1 
Group By 
    a, Left(b, 255)

Select 
    a, Mid(b, 1) As b
From 
    table1 
Group By 
    a, Mid(b, 1)

Select 
    a, First(b) As firstb
From 
    table1 
Group By 
    a

Select 
    a, DLookUp("b","table1","Id = " & [table1]![Id] & "") AS b
From 
    table1 
Group By 
    a, DLookUp("b","table1","Id = " & [table1]![Id] & "")

I have just had the same issue in various reports. The problem is indeed the Memo Field.

The solution that worked for me was more straight forward... I had to remove the "Group by" for the Memo field and the problem disapeared.

I realize this might not be an option in every situation, but if it is, this is the easiest solution as it requires no rewrite of the SQL or even any other change in the DB.

I found this solution here: Allen Brown - Grouping by Memo field yields garbage

Tags:

Ms Access