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
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