combobox no selection

  • Thread starter Thread starter RedBeard
  • Start date Start date
R

RedBeard

How would I go about creating a command button that resets a combo box
to a "pristine state" i.e. nothing selected?

Thanks!
 
If your button is on the form then the click event would have this line of code

Me.NameOfCombobox = Null

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
RedBeard said:
How would I go about creating a command button that resets a combo box
to a "pristine state" i.e. nothing selected?


The others have pointed out how to clear a normal combo box. If you are
using Access 2007, and your combo box is bound to a multi-value field and
allows multiple selections, then that method won't work. If that is the
case, you can clear the combo box by setting its value to an empty array,
like this:

Me.MyComboBox = Array()

Remember, that will only work, and will only be necessary, if the combo box
supports multiple selections.
 
Back
Top