Page 4 of 19PREVNEXT

Queries I: Get answers with queries

Phrasing your query in sentence form can be helpful.

It can help to put your query into sentence form before creating it in Access.

Before you start thinking about the nitty-gritty of creating a query, it's a good idea to think through the questions you want to answer, logically and in detail.

How do you want to choose your data? Do you want, for example, the 10 most of something, all items above or below a certain amount, or all employees who live in a different county from the location of your office?

What database fields do you need? For example, for a list of your company's five best-selling beverages, you might want beverage names, manufacturers, and suppliers, but you probably don't need the states they're bottled in.

Once the data is returned, do you want to do more with it? Do you want to multiply sales quantities times price, or view the impact on sales figures of a recent discount?

It can help to put your question into full sentence form, as in this example:

"I want to know the 10 best-selling products in our Midwest region. I need to know the product names, the product IDs, and the department that produces each product."

Don't forget: If at first you don't succeed, if your query doesn't get just the results you need, you can tinker with the query later.

Page 4 of 19PREVNEXT