Hi there, my code is giving me a 'You can't assign a value to this object." error when I try to clear the search fields
Here is my code:
Code:
Private Sub cmdReset_Click()
'Purpose: Clear all the search boxes in the Form Header, and show all records again.
Dim ctl As Control
'Clear all the controls in the Form Header section.
For Each ctl In Me.Section(acHeader).Controls
Select Case ctl.ControlType
Case acTextBox, acComboBox
ctl.Value = Null
Case acCheckBox
ctl.Value = 0
End Select
Next
'Remove the form's filter.
'DoCmd.RE
Me.FilterOn = False
End Sub
it keeps debugging on the null value .
Thanks for any help!