If you are saying you want to filter your subform records from a control on
the main form, I would suggest an option group control with 3 buttons on it.
First button labled "Closed" with an Option Value of 1, Second button labled
"Open" with an Option Value of 2, Third button labled "All" with an Option
Value of 3
Then use the option group control's After Upate event to do the filtering:
If Me.opgFilter = 3 Then
With Me.MySubformControlName.Form
.Filter = vbNullstring
.FilterOn = False
End With
Else
With Me.MySubformControlName.Form
.Filter = "[RecordType] = " & Me.opgFilter
.FilterOn = True
End With
End If
--
Dave Hargis, Microsoft Access MVP
Jeannie said:
I have an embedded form that holds two types of records, closed (=1) or open
(=2). I need a filter to display either closed, open or both. The
ApplyFilter Macro doesn't work.
Your help is much appreciated!