command button that moves items in one lsit box to another

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

Guest

Does any one have any idea how to have two or more list boxes that can move
items back forth using command buttons?
 
Does any one have any idea how to have two or more list boxes that can move
items back forth using command buttons?

Sure, there are a couple of ways to do it. The .Selected property can
be used to retreive all selected items. There is an example in the
Help. If the rowsource of the listbox is a list, then give it a new
list. Otherwise, if the rowsource is a table, then delete the record
from one table and put it in the other. Finally, refresh the
listboxes.
 
Sure, there are a couple of ways to do it. The .Selected property can
be used to retreive all selected items. There is an example in the
Help. If the rowsource of the listbox is a list, then give it a new
list. Otherwise, if the rowsource is a table, then delete the record
from one table and put it in the other. Finally, refresh the
listboxes.

I did it based on two tables - One lists all records and another one
is a list of 'ignored records'. Now, the Lists' recordsources are
queries which for top listbox say: 'Show me all records that are not
ignored' and bottom listbox: 'Show me all ignored records'.

And I've got two buttons which add or delete a record in the 'ignored'
table keeping the 'main' table intact.

Let me know if you need something like that.

Morris
 
Back
Top