课程: Access 2016 Essential Training

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Creating flexible queries with parameter requests

Creating flexible queries with parameter requests

课程: Access 2016 Essential Training

Creating flexible queries with parameter requests

- Sometimes you'll want to create a query framwork 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, you can instead ask the user when it's run for the criteria then. This is called a parameter request and they're another very useful tool to have when building out your databases. Let's start by creating a very simple query here in the Designer, and I'm going to pull in data from our Guests table. Let's go ahead and close the Show Table window and I'm going to pull down the FirstName and LastName field, and also the Country just by double-clicking on each of these here. Now we've seen how we can specify a criteria that looks for a specific value. So for instance, if I come down here into Country and type in France here, and if I were to run it, we can see that there are a total of five guests that come from France. Let's go ahead and switch back into Design View. Now if we were to save this…

内容