Using Conditional Analysis

Learning Outcomes

  • Use conditional analysis

In our discussion so far, getting information from Access databases has been a matter of creating queries, adding criteria and calculations, saving the queries, and then formatting the data into reports that can be run over and over as needed. Conditional Analysis comes into play when the basis of the analysis is in a state of flux or may otherwise need to change. Using parameter queries in Access is a solid approach to deal with this condition.

In the example below, a query is being prepared to display data regarding Purchase Order shipped and invoice dates. A hard-coded date is a criteria for the query.

A query that looks at Orders, Purchase Order Details, and Invoices.

But what if users from different departments need the flexibility to fetch this information from different time periods? Notice how this draft query has been changed to a conditional query by bracketing user instructions in the example below.

A query that looks at Orders, Purchase Order Details, and Invoices.

Now when the query is run, this dialog box would open and display the bracketed text to give the user the opportunity to enter the desired date of the analysis.

An Enter Parameter Value dialog box. The field below "Enter System Period" is empty.

Practice Question

Contribute!

Did you have an idea for improving this content? We’d love your input.

Improve this pageLearn More