Creating and running a query

You can create queries to retrieve records in a user database. You can create a query for any record type.

About this task

Creating a query involves several steps: selecting the record type, adding filters, creating the display layout, and saving and running the query.

Procedure

To create a query:
  1. Click File > New > Query.
    The Query Name and Record Type page of the New Query wizard opens.
  2. Type a name for the new query, select the record type on which to query, and select the folder in which to save the query.
    By default, the new query is stored at the root of the Personal Queries folder. To select a different folder, click the folder name in the Folder list.
  3. Click Next.
    The Select fields to use as query filters page opens.
  4. Select query filter fields by either double-clicking a field name in the Fields list, or dragging the field name to the Filters list on the right.
  5. Optional: You can group filters in any combination to create a complex filter. In the Filters list, use the logical operators AND and OR to create groups.
  6. Click Next.
    The Define Query Filters page opens.
  7. For each field that you selected on the previous wizard page, specify the filter values.
    When the query runs, the filter values are compared to the field values in the database records to determine which records to include in the query results.
  8. Click Next.
    The Define Display Fields page opens.
  9. Define the format of the query results by selecting the record fields to display. Either double-click the field names in the Fields list, or drag the field names to the Display Format grid.
    You must select at least one display field to create a valid query.
  10. Optional: If you do not want to run the query, clear the Run Query check box.
  11. Click Finish.

Results

The query is saved to the folder you specified on the first page of the New Query wizard. When you run a query, the results appear in the Query Results view. You can change the sort order of the query results by clicking the heading at the top of each column.

Note:

The administrator usually sets a soft limit on the number of rows that can be displayed in a result set when you run a query. If the query that you run tries to return a recordset that is greater than this limit, a dialog is displayed letting you know that the limit has been exceeded. In this dialog, you can edit the limit and make it higher.