G
Guest
I have a team of people unable to work today!!!!
When they run this command an error indicating Error 3075 - Function is not
available in expressions in query expression 'IIf([completiondate_45 (see the
code below).....
I don't understand this code has work for many years then this morning boom!!
For the last 4 hours I have dug into this code removing this IIf and and
counting commas & quotes etc...
Please let me know if you see why it gets hung starting at this point???
////
SELECT DISTINCTROW tblQualityData.ICNNo, tblQualityData.GBULocation,
IIf([tblqualitydata].[typeofcomplaint]="1","Complaint",IIf([tblqualitydata].[typeofcomplaint]="2","Grievance","Not
Indicated")) AS Type, tblQualityData.MemberNo, tblQualityData.ReceiptDate,
tblQualityData.Source, tblQualityData.AcknowledgementDate,
tblReviewers.Reviewer, tblQualityData.IssueCloseDate, IIf([csreceiptdate] Is
Null And [receiptdate] Is Null,0,IIf([csreceiptdate] Is
Null,[receiptdate],IIf([csreceiptdate]>[receiptdate],[receiptdate],[csreceiptdate])))
AS StartDate, [startdate]+60 AS CompletionDate_60, [startdate]+45 AS
CompletionDate_45, IIf([issueclosedate] Is Not Null,"CLOSED",
IIf([completiondate_45]<Date(),"OVER DUE",IIf([csreceiptdate] Is Null And
[receiptdate] Is Null,"NO DATE",IIf([csreceiptdate] Is
Null,DateDiff("d",Date(),[receiptdate]+45),DateDiff("d",Date(),[csreceiptdate]+45)))))
AS DaysRemaining_45, IIf([issueclosedate] Is Not
Null,"CLOSED",IIf([completiondate_60]<Date(),"OVER DUE",IIf([csreceiptdate]
Is Null And [receiptdate] Is Null,"NO DATE",IIf([csreceiptdate] Is
Null,DateDiff("d",Date(),[receiptdate]+60),DateDiff("d",Date(),[csreceiptdate]+60)))))
AS DaysRemaining_60, tblQualityData.InsuranceType, tblMemberInfo.LastName,
tblMemberInfo.FirstName, tblReviewers.RACF,
tblQualityData.ClinicalPeerReview, tblQualityData.SeverityLevel,
tblQualityData.CSReceiptDate, IIf([daysremaining_60]="1" Or
[daysremaining_60]="2" Or [daysremaining_60]="3" Or [daysremaining_60]="4" Or
[daysremaining_60]="5" Or [daysremaining_60]="6" Or [daysremaining_60]="7" Or
[daysremaining_60]="8" Or [daysremaining_60]="9","0" &
[daysremaining_60],[daysremaining_60]) AS DaysRemaining2,
IIf([daysremaining_45]="1" Or [daysremaining_45]="2" Or
[daysremaining_45]="3" Or [daysremaining_45]="4" Or [daysremaining_45]="5" Or
[daysremaining_45]="6" Or [daysremaining_45]="7" Or [daysremaining_45]="8" Or
[daysremaining_45]="9","0" & [daysremaining_45],[daysremaining_45]) AS
DaysRemaining_45_2
FROM tblMemberInfo RIGHT JOIN (tblQualityData LEFT JOIN tblReviewers ON
tblQualityData.Reviewer = tblReviewers.RACF) ON tblMemberInfo.MemberNo =
tblQualityData.MemberNo;
When they run this command an error indicating Error 3075 - Function is not
available in expressions in query expression 'IIf([completiondate_45 (see the
code below).....
I don't understand this code has work for many years then this morning boom!!
For the last 4 hours I have dug into this code removing this IIf and and
counting commas & quotes etc...
Please let me know if you see why it gets hung starting at this point???
////
SELECT DISTINCTROW tblQualityData.ICNNo, tblQualityData.GBULocation,
IIf([tblqualitydata].[typeofcomplaint]="1","Complaint",IIf([tblqualitydata].[typeofcomplaint]="2","Grievance","Not
Indicated")) AS Type, tblQualityData.MemberNo, tblQualityData.ReceiptDate,
tblQualityData.Source, tblQualityData.AcknowledgementDate,
tblReviewers.Reviewer, tblQualityData.IssueCloseDate, IIf([csreceiptdate] Is
Null And [receiptdate] Is Null,0,IIf([csreceiptdate] Is
Null,[receiptdate],IIf([csreceiptdate]>[receiptdate],[receiptdate],[csreceiptdate])))
AS StartDate, [startdate]+60 AS CompletionDate_60, [startdate]+45 AS
CompletionDate_45, IIf([issueclosedate] Is Not Null,"CLOSED",
IIf([completiondate_45]<Date(),"OVER DUE",IIf([csreceiptdate] Is Null And
[receiptdate] Is Null,"NO DATE",IIf([csreceiptdate] Is
Null,DateDiff("d",Date(),[receiptdate]+45),DateDiff("d",Date(),[csreceiptdate]+45)))))
AS DaysRemaining_45, IIf([issueclosedate] Is Not
Null,"CLOSED",IIf([completiondate_60]<Date(),"OVER DUE",IIf([csreceiptdate]
Is Null And [receiptdate] Is Null,"NO DATE",IIf([csreceiptdate] Is
Null,DateDiff("d",Date(),[receiptdate]+60),DateDiff("d",Date(),[csreceiptdate]+60)))))
AS DaysRemaining_60, tblQualityData.InsuranceType, tblMemberInfo.LastName,
tblMemberInfo.FirstName, tblReviewers.RACF,
tblQualityData.ClinicalPeerReview, tblQualityData.SeverityLevel,
tblQualityData.CSReceiptDate, IIf([daysremaining_60]="1" Or
[daysremaining_60]="2" Or [daysremaining_60]="3" Or [daysremaining_60]="4" Or
[daysremaining_60]="5" Or [daysremaining_60]="6" Or [daysremaining_60]="7" Or
[daysremaining_60]="8" Or [daysremaining_60]="9","0" &
[daysremaining_60],[daysremaining_60]) AS DaysRemaining2,
IIf([daysremaining_45]="1" Or [daysremaining_45]="2" Or
[daysremaining_45]="3" Or [daysremaining_45]="4" Or [daysremaining_45]="5" Or
[daysremaining_45]="6" Or [daysremaining_45]="7" Or [daysremaining_45]="8" Or
[daysremaining_45]="9","0" & [daysremaining_45],[daysremaining_45]) AS
DaysRemaining_45_2
FROM tblMemberInfo RIGHT JOIN (tblQualityData LEFT JOIN tblReviewers ON
tblQualityData.Reviewer = tblReviewers.RACF) ON tblMemberInfo.MemberNo =
tblQualityData.MemberNo;