>Okay, I think I've narrowed down the problem, but I still can't solve it. My listbox loads properly with data from my table. I select multiple items and all is well. But if I deactivate and re-activate the form (i.e. by selecting another form and returning to the first one), the previously selected items in my listbox are no longer selected. How can I keep the items selected?
Elyse,
With rowsource fields record pointer follows table. You would have to individually set each selected(itemid)=.T. AND you wouldn't set focus to listbox. When user sets focus to listbox by any means (click, tab etc) he loses the selections. A workaround is to not usng a listbox but a grid. See MultiselectGrid here in downloads section or an enhanced version at
www.foxyclasses.com . With grid all you need to set if a field flag.
Cetin