Filters and Re-Ordering

  • Thread starter Thread starter SheldonMopes
  • Start date Start date
S

SheldonMopes

I have a query in a subform. I would like to put a button on the main
form in which the subform resides in order to be able to apply a
certain type of filter to the subform, and another button to change
the order in which the data is displayed. Any easy solutions?
Thanks for any and all help.

Sheldon
 
To filter the Subform Recordset:

Me.[SubformControl].Form.Filter = ...
Me.[SubformControl].Form.FilterOn = True

To order the records on the Subform

Me.[SubformControl].Form.OrderBy = ...
Me.[SubformControl].Form.OrderByOn = True

Substitute [SubformControl] with the name you use. Note that the
SubformControl name may be different from the name of the Form being used as
the Subform (or more technically accurate, the name of the Form being used
as the SourceObject of the SubformControl).
 
Back
Top