List with draggable items

O

Onno Willems

Hi,

I'm looking for ideas for the following: I have a table with a bunch of
records. In a form, a user must be able to move the order of the records
until he/she thinks it's right after which the records are exported to
another database of text file in that order. I could add a sequence number
to the records and use an 'order by' on the export to export them in the
right order.

But how do I make something with which a user can easily re-order the
records with? I'm thinking of something like the "change tab order" list of
the form designer (a user can select one or more rows in a list there and
drag them to new positions). I haven't got a clue how to make something like
that.

Another idea is creating a continuous form ordered by the sequence number,
putting up/down buttons on the form to increase / decrease the sequence
number and requery the form on each click, but this seems rather clumsy and
user unfriendly way.

Anyone got a better idea?

Thanks,
Onno Willems
The Netherlands
 
L

Larry Linson

Drag-and-drop is not a strong point of Access. The normal way this is
handled is with two list boxes, similar to the approach used in the Report
wizards to select/deselect fields to be included. Each edition of the Access
<version> Developer's Handbook by Litwin, Getz, et al, published by Sybex
has had an example. Those are very general, intended to support multiple
uses in the same database; if you only have one instance in the database,
you may be able to make it specific and simplify your future maintenance.

Back in Access 2.0 days, I designed such a specific two-list-box-solution
which a relatively inexperienced Access developer was able to implement
without trouble. I don't have it to use as an example; it was done for a
client's 'bespoke system'.

Larry Linson
Microsoft Access MVP
 
O

Onno Willems

Hi Larry,

Thanks for you answer.

I spend a day and a half working on the continues form idea I had myself:
- included up/down buttons,
- row (=current record) highlighting,
- keep the current record selected as it moves up/down
- added some proper focus handling
Voila! A workable solution that almost looks like a list. You can't really
drag items to a new position (have to use the up/down buttons for that), but
it looks and its very workable.

Thanks again for sharing your ideas,
Onno
 

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