Reset Multicolumn Combobox

B

bymarce

I have filter form based on Allen Browne's example. Thanks Allen!! I
recently added a unbound filter combobox with 3 columns. When I click the
reset button I get an error "Can't assign value to this object." Previously
this worked. Here's the code. The line "ctl.value = null" is highlighted.
Thanks.
Public Function Reset(FormName As Form)
Dim ctl As Control, i As Integer
For Each ctl In FormName.Section(acHeader).Controls
Select Case ctl.ControlType
Case acTextBox, acComboBox
ctl.Value = Null
Case acCheckBox
ctl.Value = False
Case acListBox
For i = 0 To ctl.ListCount - 1
ctl.Selected(i) = False
Next i

End Select
Next
FormName.FilterOn = False
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top