A family of Microsoft relational database management systems designed for ease of use.
Then you will need to reference the subform from the main form (UNTESTED)....
If [NameOfYourSubform].Form.FilterOn Then
[NameOfYourSubform].Form.FilterOn = False
Else
[NameOfYourSubform].Form.Filter = "datanumber <=20"
[NameOfYourSubform].Form.FilterOn = True
End If
--
Gina Whipp
2010 Microsoft MVP (Access)
Please post all replies to the forum where everyone can benefit.