Clearing a combo box

  • Thread starter Thread starter Vayse
  • Start date Start date
V

Vayse

I have a databound form, frmClients. One of the field is a combo box,
comDepartment, which lets a user select a department for the Client.
But I can't figure out how to clear the box. That is, sometimes a Client is
dropped by a Department. How would a user clear the combo box so that no
Department is selected?
With the combo box dropdown style:
Dropdown: User must pick from the list, so there is no way of clearing the
box
Dropdown List: User can type a value. But even if the user deletes the
value, it won't be saved.

Suggestions please.
Thanks
Vayse
 
Vayse,

I'm not sure I understand what you mean by clearing the combo box.

However, if you want to de-select the currently selected item, so that
nothing is selected in the combo box:

combobox1.SelectedItem = Nothing

or

combobox1.SelectedIndex = -1

or

combobox1.SelectedValue = some value not contained in the values collection

Kerry Moorman
 
Back
Top