Record Source Error - Can't use a pass-through query or a non-fixed-column query

G

gumby

You Can't use a pass-through query or a non-fixed-column query as a
record source for a subform or subreport.

Before you bind the form or subreport to a crosstab query, set the
query's column headings property.


I have a report with four subreports.
For one of the subreports I get the above error. Here is the SQL from
the query.

SELECT tblMonth.MonthTack, tblMonth.MonthTackNumberFY,
tblMonth.MonthTackNumberCY, IIf(Abs(Sum([StatusCr]<>"No Objective
Required"))<>0,Abs(Sum([StatusCr]="Objective Meet"))/
Abs(Sum([StatusCr]<>"No Objective Required"))) AS ResponseRateC,
Count(qryRecruitment_Measures_BaseCases.RecruitmentID) AS CompletedC,
Avg(qryRecruitment_Measures_BaseCases.[Work Days From Date Case Began
to Close]) AS [AvgOfWork Days From Date Case Began to Close],
qryRecruitment_Measures_BaseCases.Area,
qryRecruitment_Measures_BaseCases.MonthANDYear,
qryRecruitment_Measures_BaseCases.FiscalYearClosed
FROM qryRecruitment_Measures_BaseCases INNER JOIN tblMonth ON
qryRecruitment_Measures_BaseCases.MonthClosed = tblMonth.MonthTackName
WHERE (((qryRecruitment_Measures_BaseCases.FiscalYearClosed)="2008")
AND ((qryRecruitment_Measures_BaseCases.MonthANDYear)<>[forms]!
[frmHRCReports]![cboMonthYear]))
GROUP BY tblMonth.MonthTack, tblMonth.MonthTackNumberFY,
tblMonth.MonthTackNumberCY, qryRecruitment_Measures_BaseCases.Area,
qryRecruitment_Measures_BaseCases.MonthANDYear,
qryRecruitment_Measures_BaseCases.FiscalYearClosed;

When I added the
((qryRecruitment_Measures_BaseCases.MonthANDYear)<>[forms]!
[frmHRCReports]![cboMonthYear])) it does not work. But if I remove
that where statement it works just fine. With the following SQL.

SELECT tblMonth.MonthTack, tblMonth.MonthTackNumberFY,
tblMonth.MonthTackNumberCY, IIf(Abs(Sum([StatusCr]<>"No Objective
Required"))<>0,Abs(Sum([StatusCr]="Objective Meet"))/
Abs(Sum([StatusCr]<>"No Objective Required"))) AS ResponseRateC,
Count(qryRecruitment_Measures_BaseCases.RecruitmentID) AS CompletedC,
Avg(qryRecruitment_Measures_BaseCases.[Work Days From Date Case Began
to Close]) AS [AvgOfWork Days From Date Case Began to Close],
qryRecruitment_Measures_BaseCases.Area,
qryRecruitment_Measures_BaseCases.MonthANDYear,
qryRecruitment_Measures_BaseCases.FiscalYearClosed
FROM qryRecruitment_Measures_BaseCases INNER JOIN tblMonth ON
qryRecruitment_Measures_BaseCases.MonthClosed = tblMonth.MonthTackName
WHERE (((qryRecruitment_Measures_BaseCases.FiscalYearClosed)="2008"))
GROUP BY tblMonth.MonthTack, tblMonth.MonthTackNumberFY,
tblMonth.MonthTackNumberCY, qryRecruitment_Measures_BaseCases.Area,
qryRecruitment_Measures_BaseCases.MonthANDYear,
qryRecruitment_Measures_BaseCases.FiscalYearClosed;



David
 

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