How to Design a Query in Microsoft Access

Ask us a question on-line
or get our email address on scr.im

Access Programmers has a mission to help people improve productivity through the effective use of technology.

 

 

Microsoft Certified Partner

  

How to Design a Query

Under the Microsoft Access View menu, point to Database Objects, and then select Queries. See the example below.

open queries window

The following screen will appear. Double-click on ‘Create query in Design view’.

create query in design view

The ‘Show Table’ screen will appear similar to the example below with a list of tables in the database. Select the table name and click on the ‘Add’ button.

The above should be repeated for each table you want included in your query.

When all of the tables have been selected, click on the ‘Close’ button to close the ‘Show Table’ screen. 

show table window

The following screen will appear. As you can see in the example below, both the Author and Book tables have been selected and now appear in the top half of the query design window. 

query design window

In the Book table field list in the top half of the query design window, double-click on each field to add the following fields: BookID, BookName, AuthorID.

In the Author table field list in the top half of the query design window, double-click the *. Clicking on the * is the equivalent of selecting all the fields from a particular table.

The query design window should appear as in the following example.

Query design window

In order to save the query, click on the ‘Save’ button on the toolbar at the top of the screen. A ‘Save As’ pop up box will appear that will ask for the Query Name. It is customary to preface your query name with the words ‘qry’. In the example below, the query has been names qryBookAuthor

save query as

The newly named query now appears as ‘qryBookAuthor’ under the Query Objects in the example below.

your query will appear on the query list

From the Query menu, click Run to view the results of the query. Run is the red exclamation point at the top of the screen. 

Run your query

The results of the query are as follows:

view your query results

How To Add Criteria to Your Query >