adrienne_r30
Registered User.
- Local time
- Today, 05:17
- Joined
- Jan 20, 2015
- Messages
- 48
Hi all,
I have a subform, based on a query that I would like to filter but can't seem to quite get it.
I have three check boxes, 'Local', 'State' and 'Federal'. I want to filter the form so only the records checked 'Local' are shown. (I don't want to filter the query). I have tried several methods, but I think my error has something to do with it being a subform. I tried,
Private Sub Form_Current()
Me.Filter = "State = true"
Me.FilterOn = True
End Sub
but this only shows one record.
I tried
Private Sub Form_Open(Cancel As Integer)
DoCmd.ApplyFilter , "State = True"
End Sub
this works if I open just the form, not the form as a subform. so then I tried:
Private Sub Form_Open(Cancel As Integer)
DoCmd.ApplyFilter , "[Forms]![sbfrm_Data_Entry_Assignment]![sbfrm_Assignment_Retainer_State]![State] = True"
End Sub
thinking this will call the control through all the forms, but this didn't work either.
Can anyone please help
Thanks
I have a subform, based on a query that I would like to filter but can't seem to quite get it.
I have three check boxes, 'Local', 'State' and 'Federal'. I want to filter the form so only the records checked 'Local' are shown. (I don't want to filter the query). I have tried several methods, but I think my error has something to do with it being a subform. I tried,
Private Sub Form_Current()
Me.Filter = "State = true"
Me.FilterOn = True
End Sub
but this only shows one record.
I tried
Private Sub Form_Open(Cancel As Integer)
DoCmd.ApplyFilter , "State = True"
End Sub
this works if I open just the form, not the form as a subform. so then I tried:
Private Sub Form_Open(Cancel As Integer)
DoCmd.ApplyFilter , "[Forms]![sbfrm_Data_Entry_Assignment]![sbfrm_Assignment_Retainer_State]![State] = True"
End Sub
thinking this will call the control through all the forms, but this didn't work either.
Can anyone please help
Thanks