en uk

Querying a Database Microsoft Access 2007

    One problem with sorting or filtering a database table is that you must con­stantly define what you want to sort or filter. In case you sort or filter your data a certain way on a regular basis, you can use a query instead.

    A query is nothing more than a saved version of your sort or filter criteria. By saving the particular sort or filter criteria as a query, you can select that query by name later.

    Creating a simple query

    If your database table contains dozens of different fields, you may find it con­fusing to make sense of all your information. As an aid, a simple query strips away fields so you see only the fields containing data you want to see, such as a person's name and phone number but not her hire date or employee number.

    To create a query, follow these steps:

    1. Click the Create tab.

    2. Click the Query Wizard icon in the Other group.

    The New Query dialog box appears, as shown in Figure 17-8.

    Querying a Database Microsoft
Access 2007

    Figure 17-8:

    The New Query dialog box lets you choose a query wizard.

    3. Click Simple Query Wizard and then click OK.

    The Simple Query Wizard dialog box appears, as shown in Figure 17-9.

    Querying a Database Microsoft
Access 2007

    Figure 17-9:

    The Simple Query

    Wizard

    Dialog box lets you pick the fields to use for your query.

    4. Click a field name listed in the Available Fields box and then click the > button.

    Access displays your chosen field in the Selected Fields box.

    5. Repeat Step 4 for each field you want to use in your query.

    6. Click Next.

    Another dialog box appears, as shown in Figure 17-10. This dialog box asks whether you want to display a Detail (shows every record) or Summary (shows numerical information such as the total number of records found, the average value, and the minimum/maximum value) view of your data.

    Querying a Database Microsoft
Access 2007

    Figure 17-10:

    Choose between viewing Detail or Summary view.

    7. Select the Detail or Summary radio button and then click Next.

    Another dialog box appears, asking you to type a descriptive name for your query, as shown in Figure 17-11.

    Querying a Database Microsoft
Access 2007

    Figure 17-11:

    Type a descriptive name for your query.

    8. Click in the text box, type a descriptive name for your query, and then click Finish.

    Access displays the results of your query as a separate tab.

    9. Click the Office Button and then choose Save to save your query.




BACK NEXT TOP

Site is a private collection of materials and is an amateur informational and educational resource. All information is obtained from public sources. The administration does not apply for authorship of the materials used. All rights belong to their owners.