Filter on Checkbox - Resolved
I have a Yes/No field (Archive) in my table for archived studies that is tied to a checkbox (chkArchive) on a form. I would like to hit a button (btnActive) and filter out all the records for which that box is checked. Currently I'm calling an On Click event:
This works, except when I press the button a dialog comes up requesting a parameter value for frmMain.[chkActive]. If I enter "0" it works. If I enter anything but "0" in the dialog that comes up, it filters everything.
Seems like this should be easier than it is (and it probably is...)
I have a Yes/No field (Archive) in my table for archived studies that is tied to a checkbox (chkArchive) on a form. I would like to hit a button (btnActive) and filter out all the records for which that box is checked. Currently I'm calling an On Click event:
Code:
Private Sub btnActive_Click()
Me.Filter = "frmMain.[ChkArchive] = 0"
Me.FilterOn = True
End Sub
This works, except when I press the button a dialog comes up requesting a parameter value for frmMain.[chkActive]. If I enter "0" it works. If I enter anything but "0" in the dialog that comes up, it filters everything.
Seems like this should be easier than it is (and it probably is...)
Last edited: