D
Dorian
Any idea why this wont sort by Lastname ?
SELECT C.Restitution-NZ(P.TotalPaid,0) AS [Current Debt], Trim(C.Firstname &
" " & C.Lastname) AS [Debtor's Name],
IIf(DisputedSW=True,"Disputed","Undisputed") AS [Type of Debt],
IIf(P.PayAge<30,'X','') AS [Age <30 Days], IIf(P.PayAge>=30 And
P.PayAge<=90,'X','') AS [Age 30-90 Days], IIf(P.PayAge>90,'X','') AS [Age >90
Days], IIf(NZ(HomeAddressStreet,'')='','',HomeAddressStreet & ', ' &
HomeAddressCity & ', ' & HomeAddressState & ' ' & HomeAddressZip) AS
[Debtor's Address], C.PID AS [Debtor's Personal ID], C.DOB AS [Debtor's Date
of Birth], C.Phone AS [Other Debtor Contact Data], C.CaseNumber AS [Agency
Debt Identifier], C.Comments3 AS [Collection Efforts to Date]
FROM [Beth AFirms] AS C LEFT JOIN qryCasePayments AS P ON
C.CaseNumber=P.CaseNumber
WHERE C.Unit = 'Member Fraud' AND (C.Restitution-NZ(P.TotalPaid,0))>0
ORDER BY C.Lastname;
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
SELECT C.Restitution-NZ(P.TotalPaid,0) AS [Current Debt], Trim(C.Firstname &
" " & C.Lastname) AS [Debtor's Name],
IIf(DisputedSW=True,"Disputed","Undisputed") AS [Type of Debt],
IIf(P.PayAge<30,'X','') AS [Age <30 Days], IIf(P.PayAge>=30 And
P.PayAge<=90,'X','') AS [Age 30-90 Days], IIf(P.PayAge>90,'X','') AS [Age >90
Days], IIf(NZ(HomeAddressStreet,'')='','',HomeAddressStreet & ', ' &
HomeAddressCity & ', ' & HomeAddressState & ' ' & HomeAddressZip) AS
[Debtor's Address], C.PID AS [Debtor's Personal ID], C.DOB AS [Debtor's Date
of Birth], C.Phone AS [Other Debtor Contact Data], C.CaseNumber AS [Agency
Debt Identifier], C.Comments3 AS [Collection Efforts to Date]
FROM [Beth AFirms] AS C LEFT JOIN qryCasePayments AS P ON
C.CaseNumber=P.CaseNumber
WHERE C.Unit = 'Member Fraud' AND (C.Restitution-NZ(P.TotalPaid,0))>0
ORDER BY C.Lastname;
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".