Well this is the query for my Interventions by location by pharmacist, so yes this is the record source for my report.
-
-
PARAMETERS [Enter Pharmacist Name] Text ( 255 ), [Start Date] DateTime, [End Date] DateTime;
-
SELECT Intervensions1.Location, Count(Intervensions1.fldID) AS CountOffldID
-
FROM Intervensions1
-
WHERE (((Intervensions1.Pharmacist) Like "*" & [Enter Pharmacist Name] & "*") AND ((Intervensions1.Date) Between [Start Date] And [End Date]))
-
GROUP BY Intervensions1.Location;
-
-
If it's your record source for your report then if you change the query just slightly so that your parameter will show up in your field list for your report, like so:
- PARAMETERS [Enter Pharmacist Name] Text ( 255 ), [Start Date] DateTime, [End Date] DateTime;
-
SELECT Intervensions1.Location, Count(Intervensions1.fldID) AS CountOffldID, [Enter Pharmacist Name] AS NamePrompt
-
FROM Intervensions1
-
WHERE (((Intervensions1.Pharmacist) Like "*" & [Enter Pharmacist Name] & "*") AND ((Intervensions1.Date) Between [Start Date] And [End Date]))
-
GROUP BY Intervensions1.Location;
Then you should be able to put this expression in your textbox on your report:
="Interventions by location by " & [NamePrompt]
As I mentioned before, this method has worked for me in the past, but the way I've used it in the past, I've needed my prompt to be in my field list.