Creating Queries
Access gives you three ways to create a query:
The Query wizard gives you a quick-and-dirty way to build a simple query. However, this option also gives you the least control.
Tip
If you decide to use the Query wizard to create your query, then youâll probably want to refine your query later on using Design view.
Design view offers the most common approach to query building. It provides a handy graphical tool that you can use to perfect any query.
SQL view gives you a behind-the-scenes look at the actual query command, which is a piece of text (ranging from one line to more than a dozen) that tells Access exactly what to do. The SQL view is where many Access experts hang outâand though it seems intimidating at first glance, itâs actually not that difficult to decipher (as youâll see on Understanding the SQL View).
Creating a Query in Design View
The best starting point for query creation is the Design view. The following steps show you how it works. (To try this yourself, you can use the BoutiqueFudge.accdb database thatâs included with the downloadable samples for this chapter.) The final resultâa query that gets the results that fall in the first quarter of 2010âis shown in Figure 6-6.
Hereâs what you need to do:
Choose CreateâQueriesâQuery Design.
A new design window appears, where you can craft your query. But before you get started, Access pops open the Show Table dialog box, where you can choose the tables that you want to work with (Figure 6-1 ...
Get Access 2010: The Missing Manual now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.