Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all I have a form and a subf

Status
Not open for further replies.

Sadukar

Technical User
Feb 19, 2003
159
IE
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.

 
Never mind

Figured it out.

Sorry about the Subject name too, I forgot to put it in.
Thanks anyway
S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top