Sorting Problem in Report

P

phnomda

I'm having a problem that seems like it should be easy to fix... and
yet I can't seem to fix it. I would like in a report to group by one
of the fields in a table, and would like the grouping to be in
ascending order. The report is grouping by the field, but it is all
out of order. No matter what I do, it retains the same, wrong, non-
ascending order. The table is in ascending order, and the field on the
report is set to ascending order. Any idea why, with so much ascending
order, it is still coming up out of order? Any help would be greatly
appreciated!
 
J

Jerry Whittle

Where are you doing the sorting? How it's in the table or even a query
doesn't matter. You must set the sort order in the report.

Would it happen to be numerical characters stored in a text field? That can
cause problems like so:

111
22
222
33

That's because text is sorted from left to right.

Leading spaces can also cause problem.

Maybe you could show examples of the problem.
 
D

DeltaTech

Hi

Open your report in design view
Click on "View" in the menu bar
Select "Sorting and grouping"

In the dialoge box select the first line (dropdown arrowhead)
Select the field to group by
Then select assending

You may need to open a group header and place you selected field in the
header

Have fun

DeltaTech
 
P

phnomda

Hi

Open your report in design view
Click on "View" in the menu bar
Select "Sorting and grouping"

In the dialoge box select the first line (dropdown arrowhead)
Select the field to group by
Then select assending

You may need to open a group header and place you selected field in the
header

Have fun

DeltaTech






- Show quoted text -

Thanks for the reply--Yes, I'd already done this-- and it says
ascending in that field when I reopen it-- but isn't ascending. This
is what's confusing me!
 
P

phnomda

Where are you doing the sorting? How it's in the table or even a query
doesn't matter. You must set the sort order in the report.

Would it happen to be numerical characters stored in a text field? That can
cause problems like so:

111
22
222
33

That's because text is sorted from left to right.

Leading spaces can also cause problem.

Maybe you could show examples of the problem.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.





- Show quoted text -

There are numbers involved-- it's a sorting of districts, which are
assigned numerical values. So the order that comes up is:

10
11
12
13
..etc
1
22
23
2

How do I get around this? Any help would be appreciated!

Thanks!
 
J

John Spencer

That is a proper sort for a text field that is storing number characters.

Try changing the sort to
= Val([DistrictField])


Val will convert the number string to a number.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
P

phnomda

That is a proper sort for a text field that is storing number characters.

Try changing the sort to
   = Val([DistrictField])

Val will convert the number string to a number.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County


There are numbers involved-- it's a sorting of districts, which are
assigned numerical values. So the order that comes up is:

How do I get around this? Any help would be appreciated!
Thanks!- Hide quoted text -

- Show quoted text -

Great! Thanks!
 

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