Add/Remove between two listboxes

dsmaj

Registered User.
Local time
Today, 15:59
Joined
Apr 28, 2004
Messages
96
I feel like I'm asking more than my fair-share of questions on these forums--you guys are just too helpfull! :D

I'm looking to implement one of those commonly seen constructs whereby there are two listboxes beside each other with an "Add >>>" and a "<<< Remove" button between them. The right hand listbox is to be populated with data from tbl1 WHERE ParentID = x and the lefthand listbox is to be populated with data from tbl1 WHERE (record is not already in the righthand listbox)

I hope this makes sense :confused:

Can anyone point me to an example of this I could look at? Or have any idea of how I might implement this? I know this is a fairly common construct, so there's gotta be some example code hiding out there...

Thanks in advance,
Sam
 
dsmaj said:
I feel like I'm asking more than my fair-share of questions on these forums--you guys are just too helpfull! :D

I'm looking to implement one of those commonly seen constructs whereby there are two listboxes beside each other with an "Add >>>" and a "<<< Remove" button between them. The right hand listbox is to be populated with data from tbl1 WHERE ParentID = x and the lefthand listbox is to be populated with data from tbl1 WHERE (record is not already in the righthand listbox)

I hope this makes sense :confused:

Can anyone point me to an example of this I could look at? Or have any idea of how I might implement this? I know this is a fairly common construct, so there's gotta be some example code hiding out there...

Thanks in advance,
Sam

One way to do this is to allow users to drag and drop items between listboxes. We have a product to facilitate this: Drag-N-Dropper http://www.peterssoftware.com/dd.htm

Another way is to have "Add", "Remove" buttons that simply use an SQL Update statement to modify the ProductID for the highlighted listbox row, and then do a form requery.

Hope this helps,
 
Thanks!

Perfect! Big thanks to both of you!

Sam
 

Users who are viewing this thread

Back
Top Bottom