filter form data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a form with a subform and would like to sort the data in the subform
descending. Is there a way to have the data already pre-sorted descending
once I open the form without having to manually sort the subform everytime I
open the form up? Both the form and subform record sources are queries
(separate queries).
 
Todd said:
I've got a form with a subform and would like to sort the data in the
subform descending. Is there a way to have the data already
pre-sorted descending once I open the form without having to manually
sort the subform everytime I open the form up? Both the form and
subform record sources are queries (separate queries).

Base the subform on a query (if not already) and in the query set the sort
order you want. The form will honor it as long as the user doesn't apply a
different sort to override it.
 
Create a query.
Use the sorting row in the query so it sorts correctly.
Save the query.

Then open the subform in design view, and change its Record Source property
to the name of the query instead of the table.
 
The subform sort works wth setting the sort order in the query. If I do the
same thing to the parent form it doesn't sort ascending or descending?
 
Todd said:
The subform sort works wth setting the sort order in the query. If I
do the same thing to the parent form it doesn't sort ascending or
descending?
Check to make sure that there is nothing in the OrderBy property of the form.
 
There was something in th orderby field property of the parent form but I
removed it and relinked to the same query (where I sorted ascending) but it
didn't sort.
 
Back
Top