You'll need to be more specific to what you want done. But in general, you'd want to have two tables, one for the source from which listbox-1 will be populated, then on the dbl-click (or through a button between the two listboxes, like the 'add' and 'remove' buttons you see on many to/from listboxes) you run the sql to insert data into the table that is the source of the second listbox, and refresh the box.
This assumes that the data is to be somewhat permanent, but like I said, you'll need to go deeper into detail on what you're trying to accomplish.
--Jim
I was not sure about tables thing... I tought I can do this based on recordsets or other some kind of temprorary data(records) container. I don't need to store records selected/moved/copied to second listbox.
Andrew
This is all encapsulated, and works on older versions of Acess that do not have the add/remove item method that I told you about. Lots of functionality and requires little coding.
Another way is to add a boolean field in the table "isSelected". The first list is based on "isSelected" equal false, the second list is based on true. When you select a value from either list it changes false to true and true to false. Requery the lists after update.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.