Hi all
I have a form and a subform within. I filter the subform by using 3 tick boxes. The code below shows If box one is ticked the otheres are locked. The grid (subform is then filtered by "filterby". This works perfect except if I click on the Check box to set it to true or false the filter turns on.
I only want to filter when the textbox is set to true.
When set to false I want to remove the filter.
Any sugestions on how to do this? I want avoid having to create another button/Filter to remove the filters.
private sub Check_click
If Me.Check1 = True Then
Me.Check2.Locked = True
Me.Check3.Locked = True
Else
Me.Check2.Locked = False
Me.Check3.Locked = False
End If
Me.Subform_Name.Form.Filter = "[filteredby] = 'Mec'"
Me.Subform_Name.Form.FilterOn = True
Thanks for your time and help.
S.
I have a form and a subform within. I filter the subform by using 3 tick boxes. The code below shows If box one is ticked the otheres are locked. The grid (subform is then filtered by "filterby". This works perfect except if I click on the Check box to set it to true or false the filter turns on.
I only want to filter when the textbox is set to true.
When set to false I want to remove the filter.
Any sugestions on how to do this? I want avoid having to create another button/Filter to remove the filters.
private sub Check_click
If Me.Check1 = True Then
Me.Check2.Locked = True
Me.Check3.Locked = True
Else
Me.Check2.Locked = False
Me.Check3.Locked = False
End If
Me.Subform_Name.Form.Filter = "[filteredby] = 'Mec'"
Me.Subform_Name.Form.FilterOn = True
Thanks for your time and help.
S.