I created a combobox that lists the top 15 most used possibilities for that field and added a [show all options] to the end of the list. Selecting the [show all items] causes the RowSource of the combobox to be changed to a query containing all options. I want to cancel the Update and dropdown the list but because the [show all items] option is not in the new list Access gives and error message.
Code:
Private Sub lstOptions_BeforeUpdate(Cancel As Integer)
If lstOptions = 9999 ThenCancel = True
lstOptions.RowSource = "qryAllOptions"
lstOptions.Dropdown
End If
End Sub
Does anybody know an alternative method to add an [show all items] option to a Combobox populated by an query?