Moving items in a list box

S

sangeenobs

Hai ,
I would like to know if there is a way to move items in a listbox. the
list box has values populated from the data base.
I would like to know if there is some way i can move items up and down
the list and at the same time make the change in the database too.
Any help appreciated!
Thank you,
Sangeeta Michael
 
M

Marshall Barton

I would like to know if there is a way to move items in a listbox. the
list box has values populated from the data base.
I would like to know if there is some way i can move items up and down
the list and at the same time make the change in the database too.


The items in a list box are displayed in the order specified
in the RowSource query. This means that the table must have
a field that can be used to sort the list to get the items
to appear the way you want them.

You will then have to have a mechanism for users to indicate
the direction and distance to move an item. Since Access
does not directly support drag and drop operations, you will
need a third party tool or a combination of additional
controls for this.

Once you have all that in place, the operation of moving an
item up/down the list involves changing the values in the
sort field of all/many/some of the table records to get them
to appear in the new order.

Altogether, it's a rather messy operaion that is rarely
worth the effort and if multiple users might be doing this
at the same time, it gets much more complicated. Unless you
are and advanced programmer, I strongly recommend against
doing this kind of thing.
 

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