Is there an Access control to let users re-order a list of items?

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

Guest

I have a list of items stored in a table, which I would like to display for
users and let them move the items up or down in the list by dragging or other
means and then be able to save the list back to the table in the order
specified by the user. Is there a control currently available to allow this?
 
There is no control now nor is there likely to ever be one since physical
order has no meaning in a relational table. You'll need to write your own
code to reorder the rows. I had to do this for a cookbook type of
application so the user didn't have to reenter everything if they left out a
step. I used a numeric field that I incremented by 10. The user could over
type the sequence number to suggest a new position for the record. They
could press the resequence button or I would do it automatically when the
form closed. The resequence procedure created a recordset in descending
order and counted the number of rows so it could calculate the last sequence
number. The code then looped through the recordset in reverse order and
updated each sequence number. I did this in reverse order because the
sequence number was part of a unique index and if you update it in ascending
order, you usually generate temporary duplicates but that doesn't happen if
you reassign the numbers in reverse order.

Ralph Whitaker said:
I have a list of items stored in a table, which I would like to display for
users and let them move the items up or down in the list by dragging or other
means and then be able to save the list back to the table in the order
specified by the user. Is there a control currently available to allow
this?
 
Back
Top