Duplicate Parameters In Report

D

doodle

Greetings all - Happy New Year.
windows xp - access 97

I have a report that contains 3 charts, each chart has a different
source. All three of the source queries are parameter queries,
prompting the user for the month (mmm-yy format).

I originally had it set up as a prameter, but did not want the user to
be prompted three times for the same information. So I created a form
called frmSys_Month. This form contains a combo box with the available
months (cmbReportMonth).

There is a button on the form that will open the report which contains
the charts.

I changed the queries. I replaced the parameter in all three queries
with this:
Forms![frmSys_Month].[cmbReportMonth]

Now my report opens with no chart data at all -

can anyone tell me what i am doing wrong?

-doodle
 
D

doodle

That worked for the Select query - but not for the other two. here is
my sql for one of them:

qryCL_MonthJoin3:

SELECT qryCL_MonthJoin.Source, qryCL_MonthJoin.CallID,
qryCL_MonthJoin.Subject, [MonthName] & "-" &
(Right(Year([ContactDt]),2)) AS RH, tblLU_CLSource.Heading
FROM (qryCL_MonthJoin LEFT JOIN tblLU_MonthRef ON
qryCL_MonthJoin.MonthID = tblLU_MonthRef.ID) LEFT JOIN tblLU_CLSource
ON qryCL_MonthJoin.Source = tblLU_CLSource.Source
WHERE ((([MonthName] & "-" &
(Right(Year([ContactDt]),2)))=[Forms]![frmSys_Main]![ReportMonth]) AND
((tblLU_CLSource.Heading)<>"CUST"));

Chart SQL:

TRANSFORM Count(qryCL_MonthJoin3.CallID) AS CountOfCallID
SELECT qryCL_MonthJoin3.Heading
FROM qryCL_MonthJoin3
WHERE (((qryCL_MonthJoin3.Source)<>"CUST"))
GROUP BY qryCL_MonthJoin3.Heading, qryCL_MonthJoin3.Source
PIVOT qryCL_MonthJoin3.Subject;


-doodle
 
D

doodle

I was able to fix one of the two broken charts by adding my forms
reference as a parameter. But I can't figure out the second one.

Fixed Chart SQL:

PARAMETERS Forms!frmSys_Month!ReportMonth Text;
TRANSFORM Count(qryCL_MonthJoin4.CallID) AS CountOfCallID
SELECT qryCL_MonthJoin4.SourceType
FROM qryCL_MonthJoin4
GROUP BY qryCL_MonthJoin4.SourceType
PIVOT qryCL_MonthJoin4.Subject;


Broken Chart SQL:

PARAMETERS Forms!frmSys_Month!ReportMonth Text;
TRANSFORM Count(qryCL_MonthJoin3.CallID) AS CountOfCallID
SELECT qryCL_MonthJoin3.Heading
FROM qryCL_MonthJoin3
WHERE (((qryCL_MonthJoin3.Source)<>"CUST"))
GROUP BY qryCL_MonthJoin3.Heading, qryCL_MonthJoin3.Source
PIVOT qryCL_MonthJoin3.Subject;


-doodle
 
D

doodle

Fixed. In qryCL_MonthJoin3 my parameter was referencing frmSys_Main
instead of frmSys_Month.

Typing in the wrong form name. smart. a true sign that i need to go
home and call it a day.

thanks again for your help,


-doodle
 

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

Similar Threads


Top