Repeating parameters upon report generation

Joined
Feb 10, 2014
Messages
2
Reaction score
0
Hello! In ACCESS 2007, I have a query that is generated from a crosstab query and a simple query that also has a parameter. and it works great! However when I generate a report from it the parameter is requested repeatedly up 2-6 times? I would like to only have one prompt. Here is the SQL code from the query I am using to generate the report:

PARAMETERS [Company?] Text ( 255 );
SELECT Permits.PermitNumber, Permits.Company, Inspections_Crosstab.[Qtr 1], Last(InspectionsLastQuery.LastOfInspDate) AS LastInspDate, Last(InspectionsLastQuery.LastOfInspComments) AS LastInspComments
FROM ((Permits LEFT JOIN Inspections ON Permits.PermitNumber=Inspections.[Permit Number]) LEFT JOIN InspectionsLastQuery ON Inspections.[Permit Number]=InspectionsLastQuery.[Permit Number]) INNER JOIN Inspections_Crosstab ON Permits.PermitNumber=Inspections_Crosstab.PermitNumber
GROUP BY Permits.PermitNumber, Permits.Company, Inspections_Crosstab.[Qtr 1]
HAVING (Permits.Company=[Company?]);

Thanks in advence for any help!
 
NM, Solved!

I needed to create a form control field i.e. a combobox, which collected the parameter input. I just referenced the form control field (combobox) in the query's design -> corresponding column ->criteria and as well as in the query's parameters list.

Hope this helps somebody else out there.
 
well, glad you solved it and reported back.

:thumb:
 
Back
Top