Add an extra field, say, SortOrder of type long. In the table create an index
UserOrder based on the User & the SortOrder. Make it unique. This means that
the SortOrder is unique to each user but do NOT make the SortOrder itself
unique as user 1 will have a SortOrder of 1 as will user 2 but we do not want
user 1 to have two SortOrder 1.
In the BeforeUpdate event check that the user has not changed the sort
order. If s/he has you will have to revise the sort orders. Another way would
be to lock that specific field's box & have a button in, say, the header to
revise the sort order a bit like the TAB order in form design. Another way is
to let the punter take care of it (not so good). To change the order of one
s/he would have to renumber all below from the last backwards to get the
space then put in the new number. If s/he duplicates a number the system will
whinge and block the change (remember we made the User/Order unique). Anyway,
I'm sure you'll come up with something
Messy but it does work. I am using it in some of my databases where, for
example, I want to display adminintration positions in a particular order and
the combinations of positions varies. In the database to track my software
different software packages have Activation codes, Unlock codes, User
codes.......... (you know what I mean) & I want them to be in the right
order, for example you enter the CD code before the Activation Cade.
Bob Rice said:
I wasn't as clear as I should have been. I have the following records in
the field, "Items" in a table:
Record 1 Wand
Record 2 Apple
Record 3 Car
I need to always show these records in the above order. The records are not
sorted, and I have no criteria on which to sort them.
A new record is added, "House". It is to be added and shown between
"Apple" and "Car", so that the data are presented:
Wand
Apple
House
Car
Thanks all.