G
Guest
I have a toggle button set up on a form to filter data based on criteria
"CHG" in the field. The code I'm using is asking for data even though I
stated the criteria. Basically I just want to filter items identified as
"CHG" when press the toggle and then when I press the toggle again I would
like the filter to be removed. Any help with this would be appreciated.
Here is the code I using;
Private Sub tgDiffActLead_AfterUpdate()
If Me.tgDiffActLead.Value = -1 Then
Me.Filter = "CHG =" & Me.Diff_Action_Lead
Me.FilterOn = True
ElseIf Me.tgDiffActLead.Value = 0 Then
Me.FilterOn = False
End If
End Sub
"CHG" in the field. The code I'm using is asking for data even though I
stated the criteria. Basically I just want to filter items identified as
"CHG" when press the toggle and then when I press the toggle again I would
like the filter to be removed. Any help with this would be appreciated.
Here is the code I using;
Private Sub tgDiffActLead_AfterUpdate()
If Me.tgDiffActLead.Value = -1 Then
Me.Filter = "CHG =" & Me.Diff_Action_Lead
Me.FilterOn = True
ElseIf Me.tgDiffActLead.Value = 0 Then
Me.FilterOn = False
End If
End Sub