I have a bound checkbox on a form. the checkbox is bound to a field in a table in access. The field has the Yes/No datatype. if a user clicks the checkbox on the form, I want the checkbox to tick only those records in the field based on the filter criteria I have set on the AfterUpdate event of the checkbox.
This is the code in the AfterUpdate Event:
The issue is that the checkbox it is only selecting 1 record and is not selecting all the records that have the expense ID=1.
I have a query based on this table which only displays items that are unchecked i.e False which feeds into a final report.
Please help me understand the issue with the filter function and why it won't select multiple records?
This is the code in the AfterUpdate Event:
Code:
Private Sub Click_To_Remove_Cost_AfterUpdate()
If Me.Click_To_Remove_Cost.Value Then
Me.Filter = "[ExpenseID_For_Strategy_Form]=1"
Me.FilterOn = True
Else
Me.FilterOn = False
End If
End Sub
The issue is that the checkbox it is only selecting 1 record and is not selecting all the records that have the expense ID=1.
I have a query based on this table which only displays items that are unchecked i.e False which feeds into a final report.
Please help me understand the issue with the filter function and why it won't select multiple records?