I have a form with several unbound text boxes that users input data for search parameters. Below i have a button that when clicked, it removes all of the text from the unbound boxes. For some reason, now when i click the clear button it is throwing up: Run-time error '2448': you can't assign a value to this object. When i Debug, It is stopping on ctl.Value = Null here is the 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 = False
End Select
Next
'Remove the form's filter.
Me.FilterOn = False
End Sub
I believe that this started happening after i changed the data type of the first field from Text to Number, as this button is working in a previous version of the database with the same code. Any ideas?