Create a database object from filtered records (MDB)

Microsoft Office Access 2003

  1. With the filtered records displayed, click the arrow next to the New Object button Button image on the toolbar.
  2. Type a name for the query, and then click OK.

    The new query appears in the Database window.

    • To use the AutoForm or AutoReport Wizard, click AutoForm or AutoReport.
    • To specify the type of form or report you want to create, click Form or Report, and then make your selection.

    The new object uses as its record source the table or query in which the filter was created, and it inherits the filter.

  3. Complete the design or make any other changes you want to the form or report, and then save it.

Notes

  • If a sort order was specified in the underlying table or query, the new form or report will use it. Whether the filter is automatically applied depends on how you create the form or report.
    • If you create the form or report directly from filtered data while the data is displayed in an open table or query, the filter is applied automatically each time you view the report, but it is applied only the first time you view the form after creating it. (The next time you open the form, you'll apply the filter yourself.)
    • If you create the form or report based on a closed table or query, the filter won't be applied in the new form or report. You apply it when you need it.
  • If you subsequently change the filter in a table or query, it has no effect on a form or report that was based on a filter you created previously in that table or query.

ShowCreate a query from a filter in a table, query, or form

Instead of designing a query from scratch in query Design view, you can create it automatically by saving an existing filter in a table, query, or form as a query. A query offers more flexibility than a filter.

  1. With the filter displayed in the Filter By Form window or the Advanced Filter/Sort window, click Save As Query Button image on the toolbar.
  2. Type a name for the query, and then click OK.

    The new query appears in the Database window. It automatically includes all the fields from the underlying table because the query's OutputAllFields property is automatically set to Yes, but you can change the query's design if necessary.

Note  You can use the query as a filter, too. You might do this if you already saved one filter with the form or datasheet, and you want to use the query as a second filter.