I'd say it's because you're looping through 10K rows to select them, then probably looping over again to move them. Manually selecting them avoids the first loop. Just a theory. I suspect you're not looping over an array but over the controls instead (I mean their item lists). You might get a speed gain by copying selected items into an array. I'd also see if there's a faster way to create an array/collection/dictionary other than looping over the selected items when all are selected. Perhaps make the 2nd control bound to a query that returns everything instead.
EDIT - going to leave my reply as is for now. I just noticed that you posted a db copy.
Last edited by Micron; 10-22-2023 at 04:03 PM.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.