Access 2016 For Dummies
Book image
Explore Book Buy On Amazon

With Access' Query Wizard, you enter table and field information, and the Simple Query Wizard takes care of the rest. Here's how you create a query:

  1. On a piece of paper, lay out the data you want in your query results.

    A query returns a datasheet (column headings followed by rows of data), so make your layout in that format. All you really need are the column headings so you'll know what data to pull from the database.

    A query layout for Access 2016.
  2. Determine the table location of each piece of data (column heading) from your paper.

    Write down the table and field name that contain the data matching the column heading on the paper above the column heading.

    A table and field name that contains the data matching each column heading.
  3. In the Database window, click the Create tab on the Ribbon and then click the Query Wizard button from the Queries section.

    The New Query Wizard dialog box appears, asking you what kind of Query Wizard you want to run. Choose Simple Query Wizard and click OK.

    The Access 2016 ribbon with the Create tab open.
  4. Choose the first table you want to include in the query.

    You'll use the Tables/Queries drop-down menu, which shows all the tables (and any existing queries) in your database. Click the down arrow next to the Tables/Queries drop-down menu. Click the name of the table or query to include in this query.

    The Simple Query Wizard window in Access 2016.
  5. Select the fields from that table for your query.

    For each field you want included in your query, click the name of the table or query to include in this query, and in the Available Fields list, double-click each field from this table or query that you want to include in the query you're creating.

    If you add the wrong field, just double-click it in the Selected Fields list. It will go back home. If you just want to start all over, click the double-left chevron (that's what you call the symbol that looks like a less-than sign) and all the selected fields go away.

    Adding fields to a query in Access 2016.
  6. After you select all the fields, click Next.

    If the wizard can determine the relationships between the tables you selected, a window appears. If you don't see the window, not to worry. Access just wants you to name the query instead. Skip the next step.

    If you include fields from two tables that aren't related, a warning dialog box appears. The dialog box reminds you that all the selected tables must be related before you can run your query — and suggests that you correct the problem before continuing. And you'll need to do so, so if you're trying to include fields from more than one table and the tables are not yet related, exit out of the Query Wizard (click Cancel) and then go set up the relationship(s). You can return to the Query Wizard after you've done so.

    Clicking next in the Access 2016's Simple Query Wizard.
  7. If the wizard asks you to choose between a Detail and a Summary query, click the radio button next to your choice and then click Next.

    Detail creates a datasheet that lists all records that match the query. As the name implies, you get all the details from those records.

    Summary tells the wizard that you aren't interested in seeing every single record; you want to see a summary of the information instead.

    If you want to make any special adjustments to the summary, click Summary Options to display the Summary Options dialog box. Select your summary options from the check boxes for the available functions — Sum, Avg, Min, and Max — and then click OK.

  8. In the wizard page that appears, select a radio button for what you want to do next.

    If you want to make your query snazzy: Select the Modify the Query Design option.

    The wizard sends your newly created query to the salon for some sprucing up, such as the inclusion of sorting and totals.

    If you want to skip the fancy stuff: Select the Open the Query to View Information option to see the Datasheet view.

    The wizard runs the query and presents the results in a typical Access datasheet.

    You can modify an Access query's design in the Simple Query Wizard.
  9. Type a title for your query in the text box and then click Finish.

    The wizard builds your query and saves it with the title you entered; then Access displays the results.

    The Simple Query Wizard allows you to give a new title to your Access query.

About This Article

This article is from the book:

About the book authors:

Laurie Ulrich Fuller is a professional technology author and trainer. She's created training materials that cover Microsoft Office and Adobe Creative Suite. Ken Cook is a professional database developer, instructor, and author. The two experts have teamed to write the previous three editions of Access For Dummies.

This article can be found in the category: