Reputation: 1686
I want to empty the combobox every time when form loads. Using the below code
Private Sub Form_Load()
combo1.RowSource = ""
End Sub
But Combobax is not emptying.
Upvotes: 3
Views: 35409
Reputation: 41
Recommend you clear using the following:
Me.comboBoxName.RowSource = ""
Me.comboBoxName = ""
Upvotes: 0
Reputation: 1617
Your code is setting the rowsource of the combo box not the value. The combo box can be cleared by setting the value directly.
Private Sub Form_Load()
combo1 = ""
End Sub
Upvotes: 6