I’m trying to copy a listbox to another one
So I clear all items in the destination listbox like this
While Forms!SalesCallInformation!lstMills.ListCount > 0
Forms!SalesCallInformation!lstMills.RemoveItem (0)
Wend
Then I copy all items like this
For i = 0 To lstMillsToAdd.ListCount - 1
Forms!SalesCallInformation!lstMills.AddItem (lstMillsToAdd.Column(0, i) & ";" & lstMillsToAdd.Column(1, i) & ";" & lstMillsToAdd.Column(2, i))
Next
The problem is that in the destination listbox, I still got the old items.
But when I set a watch on Forms!SalesCallInformation!lstMills.ListCount when I delete I can see that’s it’s decrementing so it must remove something.
Is it something with refreshing the form? Cause I tried after inserting the new items to do this: Forms!SalesCallInformation.Refresh but I have the same result.
Does anyone have an idea?
Thank you
Also, the rowSourceType is set to value list
This example works for me:
Both listboxes are Value Lists. The Row Source is set to “abc”;”def”;”ghi”