Adding a new record in alpha with an exception

A

aehan

Does anyone know if this is possible:

I want to create a form that will add a new record to a table that has only
one field, eg category; and I want these to be listed alpahabetical.
However, there are four categories that I always want to be at the bottom of
the list, irrespective of where they fall alphabetically, eg

Books (alphabetical)
DVDs (alphabetical)
Films (alphabetical)
Plays (alphabetical)
Family DVDs (not alphabetical - at bottom of choose list)
Family films (not alphabetical - at bottom of choose list)

I've been playing around with this for ages but can't find a way to do what
I want to. Does anyone have any ideas?

Many thanks
Aehan
 
K

KARL DEWEY

You will need two fields. One call TopSort and make it a number field.
Default to 0. For those Family items use 1 in the field. In design view
click on menu VIEW - Indexes. Name the index MySort and add the number field
and then the category field.
In your queries always sort on the two fields.
 
A

aehan

Thanks. I did put an Order numerical field on originally, and I placed the
categories I wanted to keep as non-alphabetical at the bottom of the list
numerically, then I used a query to sort the list. However, I couldn't then
find a way of automatically inserting new records above the non alpha ones
sor that it would sort everything else as alpha (gets more complicated every
second, sorry!). I changed the sort to your suggestion, however, this always
places the non-alphabetical items at the top of the list rather than at the
bottom, so athough it keeps them together, it doesn't actually do what I want
it to. It is actually for our family business and the non-sort itmes are the
in-house categories, so we don't want them at the beginning of the list. Do
you know of a way to force them always to be at the end? There may be a
different way of doing it.

Thanks
Aehan
 
A

aehan

Hi Jamie and Karl

Thanks to both of you, I have in the end used Karl's solution - I don't
think I read it properly first, and it does what I want it to. Thanks to you
too, Jamie, I did have a go, but I don't think my skills are at that level
yet, I will have another look later when I have more time because I would
like to understand it properly.

I really appreciate you taking the time to look at my problem, and for
replying to me.

Kind regards
Aehan
 

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