Professional Documents
Culture Documents
Chapter 10
Chapter 10
SELECT *
from Student
where StudId = [Enter a student id];
Once this query is executed, Access will prompt for user to enter
the student id. The following pop-up window will be appearing in the
Access. The sentence “Enter a student id” will become the
parameter query for this query.
Parameter query in Access
Once a value has been entered, press OK and the result will be shown.
Parameter query in Access
Output:
The information for student S007 will be display as the result.
SELECT *
from Student
where DateEnrolled between [date] and [date];
With this code, there will be only one prompt for date. The same value
will be placed into both parameters. The query returns only the rows
for the people hired on that one date.
Access with two parameters
THE CORRECT SQL statement
SELECT *
from Student
where DateEnrolled between [low date] and [high date];
From the above query, Access will prompt the user to enter 2 values. The
first prompt required the user to enter a date for “low date” and another
for “high date”.
Access with two parameters
Output: