Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving records between list boxes
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Moving records between list boxes
Miscellaneous
Thread ID:
00810627
Message ID:
00810627
Views:
72
I have 2 list boxes on a form namely list 1 and list 2.

I want to be able to move records from list 1 to list 2. I have successfully recreated this without having to use the mover class which I do not want to use.

In the double click event of list 1 I have the following code:
thisform.List2.AddItem(This.List(This.ListIndex))
thisform.RemoveItem(This.ListIndex)
In the double click event of list 2 I have the following code:
thisform.list1.AddItem(This.List(This.ListIndex))
thisform.RemoveItem(This.ListIndex)
The problem I have is that when I double click records from list box 1 to list box 2 the records are copied over but still remain in list box 1. When I double click records in list box 2 to copy them over to list box 1 they DO remove from list box 2. I'm a bit confused!!

Another piece of information is that List box 1 is populated from an on button click event on another form using an SQL statement. The form is released though once the user clicks this button.

If somebody could help it would be greatly appreciated.

Many THanks
Neil Lewis
IT R&D Manager
Velmore Ltd
Next
Reply
Map
View

Click here to load this message in the networking platform