vuyy1182
vuyy1182

Reputation: 1686

Empty combobox values when access form loads vba

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

Answers (3)

Nasih
Nasih

Reputation: 1

I used below and worked with me me.combo2.value=""

Upvotes: -2

Mike Cannon
Mike Cannon

Reputation: 41

Recommend you clear using the following:

Me.comboBoxName.RowSource = ""

Me.comboBoxName = ""

Upvotes: 0

HelloW
HelloW

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

Related Questions