swap, clear, reorder records

swap, clear, reorder records

am 21.11.2004 13:03:34 von danyjpr[ANTISPAM]

Using a table (ms access database) with an indefinite number of records. I
only want to show maximum 5 records in a certain order. (orderid). That no
problem for me.

table tblBooks

id orderid title
2 0 blah
3 0 blah
6 0 blah
7 0 blah
4 1 blah
5 2 blah
1 3 blah
8 4 blah

But now I want to manage the whole thing online and don't know how to code
it... Hope someone can help me...

thx!

d.

here a number of examples

- Insert new record and place it on orderid 1.
-------------------------------------------------
id orderid title
2 0 blah
3 0 blah
6 0 blah
7 0 blah
9 1 blah
4 2 blah
5 3 blah
1 4 blah
8 5 blah

- move up/down a record 1 or more places
--------------------------------------------
ex. record id 8 with orderid 5 gets orderid 1

id orderid title
2 0 blah
3 0 blah
6 0 blah
7 0 blah
8 1 blah
9 2 blah
4 3 blah
5 4 blah
1 5 blah

ex. record id 7 gets orderid 3

id orderid title
1 0 blah
2 0 blah
3 0 blah
6 0 blah
8 1 blah
9 2 blah
7 3 blah
4 4 blah
5 5 blah

- clear a orderid => ex. orderid 2
----------------------------------
id orderid title
1 0 blah
2 0 blah
3 0 blah
6 0 blah
9 0 blah
8 1 blah
7 2 blah
4 3 blah
5 4 blah