- 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!
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!