Sort Order - Problem with AutoNumber

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

Guest

Two years ago I created a database that had a table which identified the
types of data that were being used in the database. This links to the entry
table so that the user can't enter anything else. This table [LEVELS] is set
up by AutoNumber and Description. When the report was designed I sorted it
by [LEVELS] AutoNumber. My problem is this.....we had to add an new level
which by autonumber would be 19; however, I need it to be the first
description to print on the report and then the other numbers to sort 1-18.

19
1
2
3
etc.

Any help would be fantastic.
 
Autonumber is not a very good sort (as you have discovered). It is only
going to be correct the first time you add your data - any additions will
fall to the bottom.

You need to add a new field to use for your sort, or sort it by an existing
field that makes sense.

Why is the new item first? Is it alphabetical? Are they further grouped by
some category that you should include in your table?

In short, either use an existing field, or add a field that can be used as a
sort.
 
Dear Sondra:

You could add a column to the query which I'll call [Is19].

IIf(LEVELS = 19, 0, 1)

Then sort the report on this column first, then on the AutoNumber. Can you
see that this would do what you want?

Are you going to have more "magic numbers" that aren't going to sort as
desired? I beleive you may need a more rational approach if things continue
to go wrong with this.

Tom Ellison
 

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