Solution to Activity 10.4
In this activity, we will modify the code tagged as SQL 8 to call spSeriesList_par()
from a passthrough query and assign it to the cmbSeries
row source. Follow these steps to implement this:
- Locate the code tagged as SQL 8.
- Copy and paste the original SQL line to a new line.
- Comment out the original SQL statements.
- Modify the new SQL line to call the
spSeriesList_par
stored procedure and pass in the value fromcmbGroups
as the parameter. - Save the changes.
- Create the SQL statement. The parameter is passed in in brackets and is enclosed in single quotes. The method of constructing the parameter is identical to the VBA-based SQL:
SQL = "Call spSeriesList_par('" & Me.cmbGroups & "');"
- Create the passthrough query with the
CreatePassThrough
function. Name the passthrough queryspSeriesFiltered
:Call CreatePassThrough(SQL, "spSeriesFiltered", True, False)
- Assign the resulting passthrough...