C
crispywafers
Hi,
I have a query I made to show student's that have "paid in full" on
their invoice balance. My problem arises if the person/parent insteaad
of making one full payment to the invoice balance with one check-- ends
up making two or more payments that add up to a full payment. My
current query only works if the person makes 1 payment that is for the
full amount.
I would like the query to also show if, for that invoice, the payments
associated with it "add" up to the amount due. If they do, list the
student's name.
Help?
Current Query:
PARAMETERS [Specify School Year In Format 9/1/2004] DateTime,
[Trimester Term By Letter "J, D, or M"] Text ( 255 );
SELECT Student_Records.StudentID, Student_Records.SLastName,
Student_Records.SFirstName, Orders.TotalTuition, Payments.AmountPaid,
Orders.SchoolYear, Invoices.InvoiceID, Invoices.TriTerm,
Invoices.TriAmountDue
FROM Student_Records INNER JOIN ((Orders INNER JOIN Invoices ON
Orders.OrderID = Invoices.OrderID) LEFT JOIN Payments ON
Invoices.InvoiceID = Payments.InvoiceID) ON Student_Records.StudentID =
Orders.StudentID
WHERE (((Payments.AmountPaid)=[TriAmountDue]) AND
((Orders.SchoolYear)=[Specify School Year In Format 9/1/2004]) AND
((Invoices.TriTerm)=[Trimester Term By Letter "J, D, or M"]))
ORDER BY Student_Records.SLastName;
I have a query I made to show student's that have "paid in full" on
their invoice balance. My problem arises if the person/parent insteaad
of making one full payment to the invoice balance with one check-- ends
up making two or more payments that add up to a full payment. My
current query only works if the person makes 1 payment that is for the
full amount.
I would like the query to also show if, for that invoice, the payments
associated with it "add" up to the amount due. If they do, list the
student's name.
Help?
Current Query:
PARAMETERS [Specify School Year In Format 9/1/2004] DateTime,
[Trimester Term By Letter "J, D, or M"] Text ( 255 );
SELECT Student_Records.StudentID, Student_Records.SLastName,
Student_Records.SFirstName, Orders.TotalTuition, Payments.AmountPaid,
Orders.SchoolYear, Invoices.InvoiceID, Invoices.TriTerm,
Invoices.TriAmountDue
FROM Student_Records INNER JOIN ((Orders INNER JOIN Invoices ON
Orders.OrderID = Invoices.OrderID) LEFT JOIN Payments ON
Invoices.InvoiceID = Payments.InvoiceID) ON Student_Records.StudentID =
Orders.StudentID
WHERE (((Payments.AmountPaid)=[TriAmountDue]) AND
((Orders.SchoolYear)=[Specify School Year In Format 9/1/2004]) AND
((Invoices.TriTerm)=[Trimester Term By Letter "J, D, or M"]))
ORDER BY Student_Records.SLastName;