Creating Access Query in Design View
Design View designer allows the user to build forms in a grid-based layout, where all of the sections of the form are broken up to show as separate parts.
- To create a new query in Design view, display the Queries view in the database window and double click the
“Create query in Design view” option.
- What you see here is the query Design view, with the Show Table dialog box open on top of it. The Show Table dialog box is what you use to add tables to the query. This query will contain fields from the Clients and Projects table, you will need to add them both. Click Add to add the Clients table (which is already selected) to the query. Double-click the Projects table to add it to the query also.
Then click the Close button to close the Show Table dialog box.
- Here you see the query Design view with the table boxes in the top pane and the blank design grid in the bottom pane. Notice that the relationship between the tables is marked with a familiar line. If the tables are not linked with a relationship, the query results will not be what you expect.
To create a query, you need to add fields to the design grid. The easiest way to add fields is to double-click the field names in the table boxes in the top pane. Add the following fields to the query: First Name, Last Name and Project Description.
- You have now defined a simple query that will combine data from two different tables. To see the results of the query, click the View button (the first button on the toolbar).
- Here are the results of the query in a datasheet. To return to the Design view, you can click the view button again, just like moving between a table datasheet and the table design.
Both designers have their pros and cons, but you will probably find yourself using both to build forms in Access, depending on the specific task at hand.