By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,483 Members | 1,939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,483 IT Pros & Developers. It's quick & easy.

Ghosts in Multiselect listbox

P: 1
I've got a form that uses a multiselect listbox. When a user is selected from a combo box, values are populated into this listbox associated with that user.

The problem is, if one person has say 10 entries in the listbox, and selects the last 3-4, and the next user only has 2 entries, those last 3-4 rows are still highlighted in the listbox. This introduces null values into my code which is definitely not good.

I've tried using beforeupdate and onclick events for the combo box - but they don't seem to execute at the right time (before the new information is loaded). Does anyone have any ideas for me?

(No, Exorcisms are not an option)

Thanks :)
Jan 16 '07 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
I've got a form that uses a multiselect listbox. When a user is selected from a combo box, values are populated into this listbox associated with that user.

The problem is, if one person has say 10 entries in the listbox, and selects the last 3-4, and the next user only has 2 entries, those last 3-4 rows are still highlighted in the listbox. This introduces null values into my code which is definitely not good.

I've tried using beforeupdate and onclick events for the combo box - but they don't seem to execute at the right time (before the new information is loaded). Does anyone have any ideas for me?

(No, Exorcisms are not an option)

Thanks :)
In the Before Update of the Combobox try putting Me.refresh.
Jan 16 '07 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
If that doesn't work put it before the code that requeries the listbox which I assume is in the comboboxes after upate event.

Mary
Jan 16 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.