Sorting in Access 2K

T

Tony

Hi All,

I have a question regarding the default sort order in query design grid. My
understanding has always been that, unless I explicitly apply a sort order a
particular column, the query should sort left to right. However, today I
noticed that my queries are not doing this. It appears that the sort is
random (this is happening with text data - not memo, etc.). I've exported
the query results to Excel and have meticulously checked the values, but I
can't find out what's going wrong. What I'm seeing is similar to below:
AAA
ABC
ABD
EFG
HIJ
ELF
MAR
BAC
etc...

Am I missing something? Thanks.
 
J

John W. Vinson/MVP

Hi All,

I have a question regarding the default sort order in query design grid. My
understanding has always been that, unless I explicitly apply a sort order a
particular column, the query should sort left to right. However, today I
noticed that my queries are not doing this. It appears that the sort is
random (this is happening with text data - not memo, etc.). I've exported
the query results to Excel and have meticulously checked the values, but I
can't find out what's going wrong. What I'm seeing is similar to below:
AAA
ABC
ABD
EFG
HIJ
ELF
MAR
BAC
etc...

Am I missing something? Thanks.

Please post the SQL view of your query.
 
J

John Spencer

Your assumption is not correct. NO specific sort order is the default
for a query. It may happen that the records appear in an ordered state,
but that is a by-product of the way the records are "picked" by the
query and any indexes that may be used.

If you want the records ordered, you must apply the order.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
T

Tony

Guys,

Thanks for the heads up. No need to post the SQL with this being the case.
Although it's not very elegant, I came up with a workaround that will work
for now.

Thanks anyway...
 

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

Top