B
Bill Beshlian
I have a query where I input claim number(s) and I want returned the claim
number, last payment date and a check value of "OK" or "NO". Here is the SQL
code:
SELECT (SELECT MPT.ClaimNumber FROM MPT WHERE Instr("," & [Enter claim
numbers separated by commas with no spaces] & ",",
"," & [ClaimNumber] & ",")>0 AS [Claim Number],
Max(MPT.[Company/InsuranceCheckDate]) AS [Last Payment Date], IIf([Last
Payment Date]>(Now()-730),"OK","NO") AS [Check]
FROM MPT
GROUP BY MPT.ClaimNumber;
When I run the query I can input the claim number(s) and I get this error,
"At most on record can be returned by this subquery."
The query worked fine when I had a single parameter. Thanks!
number, last payment date and a check value of "OK" or "NO". Here is the SQL
code:
SELECT (SELECT MPT.ClaimNumber FROM MPT WHERE Instr("," & [Enter claim
numbers separated by commas with no spaces] & ",",
"," & [ClaimNumber] & ",")>0 AS [Claim Number],
Max(MPT.[Company/InsuranceCheckDate]) AS [Last Payment Date], IIf([Last
Payment Date]>(Now()-730),"OK","NO") AS [Check]
FROM MPT
GROUP BY MPT.ClaimNumber;
When I run the query I can input the claim number(s) and I get this error,
"At most on record can be returned by this subquery."
The query worked fine when I had a single parameter. Thanks!