VBA Acess - List Box (ListBox)

0

I want to make a List Box (ListBox) in Access 2010 not have any element selected by clicking on a button on the form.

What VBA code could you give to do this?

    
asked by AccessOPS 13.08.2018 в 13:37
source

1 answer

0

Set the Value property to 0.

When there is an item selected in a ListBox, the Value property returns the dependent column number. If it returns 0, nothing has been selected in the Listbox.

But the property is read and write, so if it forces 0, it removes the selection.

Try this in the code of your button.

Me.Listbox.Value = 0
  

More info at ListBox.Value property   (access)

    
answered by 13.08.2018 / 22:20
source