I have a combo box with a list of values (categories) and a listbox(multivalue selection) which has the list values populated from a query based on the selected combo box value.
The listbox is set to update the values when the user selects a new value from the combo box. However I am having some issues in the following scenario:
The code is as follows:
I've tried to perform both the de-selection and listbox requery separately and they work fine, but when done together it seems to bug out. I've also tried to use the command - DoCmd.Requery (lstProducts) with the same result.
Hopefully someone has a solution to this problem. Thanks in advance
The listbox is set to update the values when the user selects a new value from the combo box. However I am having some issues in the following scenario:
- User already has selected some items in the listbox
- When changing the category, the selected item still stays checked even though it is supposed to be de-selected.
The code is as follows:
Code:
Dim varItem as Variant
For Each varItem in lstProducts.ItemsSelected
lstProducts.Selected(varItem) = False
Next varItem
lstProducts.Requery
I've tried to perform both the de-selection and listbox requery separately and they work fine, but when done together it seems to bug out. I've also tried to use the command - DoCmd.Requery (lstProducts) with the same result.
Hopefully someone has a solution to this problem. Thanks in advance