Having trouble selecting multiple records in a table using checkboxes on a form (1 Viewer)

Finance

Registered User.
Local time
Today, 13:31
Joined
Jul 11, 2018
Messages
59
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:
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?
 

June7

AWF VIP
Local time
Today, 12:31
Joined
Mar 9, 2014
Messages
5,423
ExpenseID_For_Strategy_Form is name of field?

Clicking bound checkbox changes value of only that one record. So what do you mean by tick 'records' - plural?
 

Finance

Registered User.
Local time
Today, 13:31
Joined
Jul 11, 2018
Messages
59
ExpenseID_For_Strategy_Form is name of field?

Clicking bound checkbox changes value of only that one record. So what do you mean by tick 'records' - plural?

Yes, It has a Number Datatype
 

Users who are viewing this thread

Top Bottom