L
LynneMc
I am new to Access & trying to create a field that will calculate the
"balance due", by taking the "TotalTripCost" and subtracting all the
"PaymentAmount"s. I can get it to subtract the first payment, but I can't
figure out how to make it account for additional payments (there are varying
numbers of PaymentAmount s for any given TripID, all stored in separate
Payments records). Is there anything that will make it "add up all the
paymentamounts for this TripID and subtract from TotalTripCost"? This is what
I have now:
=[TotalTripCost]-DLookUp("[PaymentAmount]","[Payments]","[TripID] =
Forms![Trips]![TripID]")
"balance due", by taking the "TotalTripCost" and subtracting all the
"PaymentAmount"s. I can get it to subtract the first payment, but I can't
figure out how to make it account for additional payments (there are varying
numbers of PaymentAmount s for any given TripID, all stored in separate
Payments records). Is there anything that will make it "add up all the
paymentamounts for this TripID and subtract from TotalTripCost"? This is what
I have now:
=[TotalTripCost]-DLookUp("[PaymentAmount]","[Payments]","[TripID] =
Forms![Trips]![TripID]")