From the course: Microsoft Access Essential Training (Office 2021/LTSC)

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Create flexible queries with parameters

Create flexible queries with parameters

- Sometimes you'll want to create a query framework that answers many variations on the same question, instead of hard coding your queries to use the exact same criteria. Every time they're run, like what we've been doing, you can ask the user for the criteria, when the queries run. This is called a parameter request, and there are another very useful tool to have when building your database. Earlier, we created two queries that filtered our customers to a specific state. We have one query that just shows me the Florida customers and a second query that just shows me my California customers. Now this works well, but you can see that it's probably not a sustainable approach. You'd have to make 50 different queries if you wanted one for each us state. Instead, we can create a parameter query that asks the end user for the state that they're interested in when the queries run. let's do that by closing both of…

Contents