Group Items on Report but do Not Sort the Group alphabetically

  • Thread starter Need Help with Roses
  • Start date
N

Need Help with Roses

I have a table called "category" with a list of dropdown items in it. The
table only has an autonumber key and the list of items in it. The items are
listed in a specific order in the table and are not sorted alphbetically in
the table nor in the query for the table. The items are listed in the table
as a dropdown in this order and the query also shows the items in this order:
Administration
Human Resources
Events
Periodicals

I want to group the data in my report based on the "category" listing as
shown in both the table and the query. However, as soon as "group" the items
in the report, the items show up on my report as sorted "alphabetically" in
the following order (notice that Events has now swapped places with Human
Resources) :
Administration
Events
Human Resources
Periodicals

I want the groups in the report to show up in the exact same order as they
are shown in the table. I have gone into the sorting/grouping controls and
can't change what appears to be an alphabetical sort default in the
"grouping" category. What do I do??
 
K

Ken Snell \(MVP\)

How does the dropdown get an order for those records? Do you have a sorting
field in the combo box's RowSource query? If you don't, then you're not
ensuring that the order won't change in the combo box, let alone in the
report.

You will need to include some type of sorting field, where the sorting field
contains a unique value (perhaps the autonumber field could serve that
purpose?), and then use that sorting field in the report as the Grouping
field.
 
E

Evi

Easiest: Group by the Autonumber - if it has the order you require, Choose a
Header/Footer if you wish and slide the Category field into that Header.
Better: create a number field which puts the items in the order you require,
that way you can change the order at a later date or insert new items into
the list.
Just make sure that if new Categories are added, a unique number is also
added, otherwise the categories without or with the same number will simply
group together and no warning will be given.
I did find, when I did this, that I could not make the number unique in
Table design view because then it became more complex to renumber the items
if I wanted to change the order so I either had to run some code to renumber
the items or else have code in my form which didn't allow a user to close
the form until they had no duplicate numbers but this may not be an issue
for you.
Evi
 

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