sorting problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
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???


How come?

I don't recall which is which and what Access uses, but there are two
primary sorting orders one is IBM (mainframe) and the other is PC. OK.
let's not get excited about the proper names, if I have them wrong , live
with it. :-)

I just played with it a little and access is sorting "-" before "A" but
it is sorting "CATAN" before "C-BRU" Very interesting. It appears to
handling imbedded non-alpha characters differently than non imbedded. I
wonder if it ignores that character when it is imbedded? Maybe there is a
way to get it to do a literal sort?
 
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.
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top