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!
 
Joined
Feb 10, 2014
Messages
2
Reaction score
0
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.
 

muckshifter

I'm not weird, I'm a limited edition.
Moderator
Joined
Mar 5, 2002
Messages
25,739
Reaction score
1,204
well, glad you solved it and reported back.

:thumb:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top