Hi. I am struggling with resetting my combo box in VBA
I have two in my form that has a query as the row source. A user chooses a product from the first and a manufacturer from the second. This correctly brings back the required list of values. I can selected from the list and use the resulting selection. All good so far.
The problem is that the form remembers the users selection. This means that next time if they forget to select a row the form uses the old section. So if they choose a different product but not a different manufacturer it will think they wanted to use the old manufacturer choice (and visa versa). I use the selections to update the DB.
I want to force the selections to be cleared in the combo boxes and go back to "blank" or "None Selected" once I update the record in the DB. This forces the user to make new selections and removes any confusion the user has about whether he has made a selection or not.
just cant seem to find anywhere to force the combo box to clear the selection.
I tried :
Code:
Me.SectionMan.SelectedIndex = 0
Me.SectionMan.SelectedIndex = -1
This does not work. Particularly as the user might not have selected a row say for instance on form load or selection of a new product but not yet selected a manufacturer.
I need a solution that works to clear the section if they made one in the combo box.
I am sure there must be a simple solution. Please could someone put me out of my misery!
Many thanks
Tony