report Query

dmullins

Registered User.
Local time
Today, 12:53
Joined
Sep 30, 2009
Messages
20
I have a query that runs fine in datasheet view but when attached to report it bombs.

It has to be related to the expression field I put in to select to proper types from two different tables. (EXP1:)

Hear is the code.

SELECT Count(qryExamErrorsByDate.LicenseNum) AS CountOfLicenseNum, Sum(qryExamErrorsByDate.REFUNDS) AS SumOfREFUNDS, qryExamErrorsByDate.ReportingMonth, IIf(IsNull(dbo_dcd2009Licensees.LicenseType),[dbo_2009ddlcDDL-Licensees2].LicenseType,dbo_dcd2009Licensees.LicenseType) AS expr1
FROM qryExamErrorsByDate
GROUP BY qryExamErrorsByDate.ReportingMonth, qryExamErrorsByDate.[dbo_2009ddlcDDL-Licensees2].LicenseType, qryExamErrorsByDate.dbo_dcd2009Licensees.LicenseType, IIf(IsNull(dbo_dcd2009Licensees.LicenseType),[dbo_2009ddlcDDL-Licensees2].LicenseType,dbo_dcd2009Licensees.LicenseType);

Any help would really be appreciated.

Thanks
ua_right_curve.gif
Page Jump
 
but when attached to report it bombs.

how? error messages? what do you see?

Hear is the code.

SELECT Count(qryExamErrorsByDate.LicenseNum) AS CountOfLicenseNum, Sum(qryExamErrorsByDate.REFUNDS) AS SumOfREFUNDS, qryExamErrorsByDate.ReportingMonth, IIf(IsNull(dbo_dcd2009Licensees.LicenseType),[dbo_2009ddlcDDL-Licensees2].LicenseType,dbo_dcd2009Licensees.LicenseType) AS expr1
FROM qryExamErrorsByDate
GROUP BY qryExamErrorsByDate.ReportingMonth, qryExamErrorsByDate.[dbo_2009ddlcDDL-Licensees2].LicenseType, qryExamErrorsByDate.dbo_dcd2009Licensees.LicenseType, IIf(IsNull(dbo_dcd2009Licensees.LicenseType),[dbo_2009ddlcDDL-Licensees2].LicenseType,dbo_dcd2009Licensees.LicenseType);

please paste the code again wrapping with code tags

attachment.php
 

Attachments

  • wrap in code tags.jpg
    wrap in code tags.jpg
    24.9 KB · Views: 178

Users who are viewing this thread

Back
Top Bottom