sorting problem

M

moreaug

I'm having problem with the data sorting in Access 2002 (SP3).

I need to sort a text field (max. length 5) in a report. Somehow, Access
put the string "CATAN" before the string "C-BRU"... "-" is < than "A" no???


How come?
 
R

Rick Brandt

moreaug said:
I'm having problem with the data sorting in Access 2002 (SP3).

I need to sort a text field (max. length 5) in a report. Somehow, Access
put the string "CATAN" before the string "C-BRU"... "-" is < than "A" no???

In the debug window...

?("-" < "A")
True

?("A" < "-")
False

In a test table I entered "A" and "-" and sorted ascending. I got...

-
A

Is your table a standard Access/Jet table or a link top to server engine? The
latter could have a different sort rule than Access/Jet.
 
M

moreaug

I got the same result as you with a single character. Debug give me "-" <
"A" as true. Try with "CATAN" and "C-BRU", you'll have a different result.
 
M

moreaug

Weird hey? And you'll have the same result in Excel XP. With Access 97,
it's sorting perfectly..!

How do you perform a literal sort?
 
Top