Move ListBox items to another ListBox 
Author Message
 Move ListBox items to another ListBox

Hello World!!!!

I am trying to put a VBA code together in Access 97, to
move my items in lstClienList to lstClientList1.  Does
anyone has any suggestions for a type function to use.  I
will use a command button to perform the function.



Fri, 09 Dec 2005 21:28:59 GMT  
 Move ListBox items to another ListBox
Hi Malvina,

Take a look at the SelectRecords sample mdb at
http://www.daiglenet.com/MSAccess.htm. This shows one way to 'move' items
from one list to another. It actually uses a query that returns 'Available'
items on the left and a query that returns 'Selected' items on the right.
The move buttons add or delete records from the relevant table (which in
this case is a junction table which represents the M-M relationship between
Persons and Classes).

You can do similar things without tables but you would need to use callback
functions with the listboxes. The callback function allows you to base the
listbox contents on a datastructure other than a recordset based on a table
or query. It's not impossible but IMHO the table method is much easier to
understand and implement.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Quote:

> Hello World!!!!

> I am trying to put a VBA code together in Access 97, to
> move my items in lstClienList to lstClientList1.  Does
> anyone has any suggestions for a type function to use.  I
> will use a command button to perform the function.



Fri, 09 Dec 2005 23:13:08 GMT  
 Move ListBox items to another ListBox
There. Now aren't you glad I made you convert it to Access 97! <g>

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele


Quote:
> Take a look at the SelectRecords sample mdb at
> http://www.daiglenet.com/MSAccess.htm. This shows one way to 'move' items
> from one list to another. It actually uses a query that returns
'Available'
> items on the left and a query that returns 'Selected' items on the right.
> The move buttons add or delete records from the relevant table (which in
> this case is a junction table which represents the M-M relationship
between
> Persons and Classes).


> > I am trying to put a VBA code together in Access 97, to
> > move my items in lstClienList to lstClientList1.  Does
> > anyone has any suggestions for a type function to use.  I
> > will use a command button to perform the function.



Sat, 10 Dec 2005 05:51:14 GMT  
 Move ListBox items to another ListBox
Absolutely!!!! And I forgot to give you credit - Fixing that right now!

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Quote:

> There. Now aren't you glad I made you convert it to Access 97! <g>



>> Take a look at the SelectRecords sample mdb at
>> http://www.daiglenet.com/MSAccess.htm. This shows one way to 'move' items
>> from one list to another. It actually uses a query that returns
>> 'Available' items on the left and a query that returns 'Selected' items
>> on the right. The move buttons add or delete records from the relevant
>> table (which in this case is a junction table which represents the M-M
>> relationship between Persons and Classes).


>>> I am trying to put a VBA code together in Access 97, to
>>> move my items in lstClienList to lstClientList1.  Does
>>> anyone has any suggestions for a type function to use.  I
>>> will use a command button to perform the function.



Sat, 10 Dec 2005 11:46:17 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Move a listbox list to another listbox?

2. populating vb.net listbox from selected items of another listbox

3. Listbox items: copy to another listbox, but randomize their order

4. Moving Items within a Listbox

5. Move item from one listbox to another

6. Move all selected items from one listbox to another

7. moving items in a listbox!

8. Moving ListBox items to another list box

9. How do you Move items in a listbox?

10. Move Multiple Items Inside A ListBox

11. Moving listbox items in VB

12. Listbox - prevent refresh during item moves

 

 
Powered by phpBB® Forum Software