I am populating a list box with the control source being a query. The query has a where clause added from VBA from the OnIndexChanged() event of a combo box above the list box.
So...when the form is opened the list box contains data for the last selection from the combo box because that is what the query holds. I do not want to set the list box to visible = true & visible = false from the selected index changed event of the combo box as that would look silly with a lot of whitespace between the combo box and the next control on the form.
Question at hand, how can I "clear" the listbox if the combo box is empty? (regardless of what the query shows). Maybe on formload() event delete the query, since it will be re-created on indexchange()?
So...when the form is opened the list box contains data for the last selection from the combo box because that is what the query holds. I do not want to set the list box to visible = true & visible = false from the selected index changed event of the combo box as that would look silly with a lot of whitespace between the combo box and the next control on the form.
Question at hand, how can I "clear" the listbox if the combo box is empty? (regardless of what the query shows). Maybe on formload() event delete the query, since it will be re-created on indexchange()?