I have a subquery that works fine in the query (qryNA3), but when I run a report (qryNA3 as record source) I get the error below. When I remove the subquery, the report works fine. Thank you very much. James
MRAA: IIf(IsNull((select max(ADate) from tblNAPatient where tblNAPatient.AType="Annual Assessment" and tblNAPatient.PID=qryNA2.PID)),(select max(ADate) from tblNAPatient where tblNAPatient.AType="Initial Assessment" and tblNAPatient.PID=qryNA2.PID),(select max(ADate) from tblNAPatient where tblNAPatient.AType="Annual Assessment" and tblNAPatient.PID=qryNA2.PID))
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
"Grade: A - "Thanks mx! I'll run some seperate querywith the subquery" "
ooook.
thx.mx
jdallain
ASKER
I didn't have to have that subquery in that query, but it would have been easier. It works for now. I'm sure I'll have to post a follow-up question in a few weeks though. Thanks again mx. James
If you go into report design, click in the Record Source, open the SQL and run it ... what happens ?
mx