0 like 0 dislike
22 views
in Computer Science by (1.0m points)
How can you create a query in Design view?

1 Answer

0 like 0 dislike
by (1.0m points)
Open the Lesson 2 database.

Here's how to create a simple query:

In the Database window, click the Queries icon in the Objects bar and double-click Create query in Design view.

The Show Table dialog box appears, as shown in figure. Here you have to select the table or query you want to use.

Click Employees and click Add.

When you have finished adding the tables and/or queries to your new query, you can close the Show Table dialog box.

Click Close.

The Query window appears in Design view, as shown in figure. Notice that the window is split. The top half contains a box labeled Employees, which displays all the fields in the Employees table. The bottom half of the screen contains a design grid, which is where you will add the fields you want to appear in your query.

You can add fields to the design grid in two ways:

By double-clicking the field in the field list.

By clicking and dragging the field down to the design grid.

Double-click LastName and FirstName in the Employees field list.

Access adds the LastName and FirstName fields to the design grid.

Often you will have to use the field list's scroll bar to scroll up or down the list in order to find a field.

Scroll down in the field list and double-click the City field.

Now you need to specify any criteria for the query. You enter the criteria in the design grid's Criteria row. For this exercise you want to see only the records whose City fields contain "London"move on to the next step to add this criteria to the query.

Click in the City column's Criteria row and type London.

If you want to use a field in the query, but you don't want it to be displayed in the query results, uncheck the "Show" box for that field. Your design grid should look like figure.

Click the Show box for the City field to uncheck it.

The query will still use the criteria you specified for the City field, but it won't display the City field in the query results. You've created a simple query. Here's how to save it:

Click the Save button on the toolbar, type London Query and click OK.

OKlet's run our new query!

Click the  Run button on the toolbar.

Other ways to run a query are to open the Query from the Database window, or click the  Datasheet View button on the toolbar. You can also select Query » Run from the menu.

Access displays the results of the query.

Notice that while the City field is part of the query, it is not displayed because you unchecked its "Show" box back in Step 8.

Following table shows a smattering of criteria operators and examples to get you started.

Related questions

0 like 0 dislike
0 answers 53 views
0 like 0 dislike
1 answer 22 views
0 like 0 dislike
1 answer 20 views
0 like 0 dislike
1 answer 154 views
asked Feb 9, 2019 in Biology by danish (1.0m points)
0 like 0 dislike
1 answer 19 views
asked Feb 11, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
0 answers 33 views
0 like 0 dislike
1 answer 16 views
0 like 0 dislike
1 answer 26 views
0 like 0 dislike
1 answer 19 views
0 like 0 dislike
1 answer 27 views
Welcome to Free Homework Help, where you can ask questions and receive answers from other members of the community. Anybody can ask a question. Anybody can answer. The best answers are voted up and rise to the top. Join them; it only takes a minute: School, College, University, Academy Free Homework Help

19.4k questions

18.3k answers

8.7k comments

3.3k users

Free Hit Counters
...