Patrik:
Is the '19' the only part of your report's recordsource that changes?
If that's the case, and you're opening the report from within another
sub, use the built in feature of the DoCmd.OpenReport method to limit
the records it returns in the report. Here's what you can do:
In Design View of the report, set the report's recordsource to "SELECT
* FROM tbl_Temp_ImpressionQuestionnaire" which will be a completely
unfiltered report, and save it. Be sure to comment out the code that
affects the recordsource in your OnOpen event of the report.
In the sub where you're assigning the parameter and opening the report,
do this:
Dim strCriteria as String
strCriteria = "Num_Questionnaire = " & Whatever#YouWantOnReport
Find the line that says DoCmd.OpenReport "YourReportName" and replace
it with:
DoCmd.OpenReport "YourReportName", , , strCriteria
Note that the strCriteria is basically your "WHERE" clause of the SQL,
without the word "WHERE", so you can build this string into whatever
criteria you want. Remember that date criteria will need to be wrapped
with # signs and text with single quotes. Numerical parameters won't
need any wrapping.
HTH,
Jana