Hi, I used the moverlists example for a form where I want to let a user select/deselect invoice lines for printing/posting. When I set the first list to look at the invoice line table, using the button that transfers all of the records from the first list to the second results in foxpro freezing (I assume that it's looping continously).
I've also tried this using an array and a cursor as the data source, it does the same (works fine just transferring one item at a time, though). Any ideas ?
Code I'm using on the "transfer all" button:
do while thisform.listFrom.ListCount > 0
thisform.listTo.AddItem(thisform.listFrom.List(1))
thisform.listFrom.RemoveItem(1)
enddo
thisform.listFrom.refresh
Jim Worley
jim@aits-uk.net
15 years practical IT experience from sales to support to development plus B.Sc. (Hons) Computer Studies, fluent German speaker, willing to have a go at anything and don't suffer fools gladly !
I've also tried this using an array and a cursor as the data source, it does the same (works fine just transferring one item at a time, though). Any ideas ?
Code I'm using on the "transfer all" button:
do while thisform.listFrom.ListCount > 0
thisform.listTo.AddItem(thisform.listFrom.List(1))
thisform.listFrom.RemoveItem(1)
enddo
thisform.listFrom.refresh
Jim Worley
jim@aits-uk.net
15 years practical IT experience from sales to support to development plus B.Sc. (Hons) Computer Studies, fluent German speaker, willing to have a go at anything and don't suffer fools gladly !