Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / November 2005

Tip: Looking for answers? Try searching our database.

Help with calculations with an unspecified # of records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LynneMc - 30 Nov 2005 21:21 GMT
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]")
Ed Warren - 30 Nov 2005 22:01 GMT
Look in Help under Dsum(), I think that is the function you want.

Ed Warren.

>I am new to Access & trying to create a field that will calculate the
> "balance due", by taking the "TotalTripCost" and subtracting all the
[quoted text clipped - 9 lines]
> =[TotalTripCost]-DLookUp("[PaymentAmount]","[Payments]","[TripID] =
> Forms![Trips]![TripID]")
LynneMc - 30 Nov 2005 22:38 GMT
Thank you Ed, that worked!

> Look in Help under Dsum(), I think that is the function you want.
>
[quoted text clipped - 13 lines]
> > =[TotalTripCost]-DLookUp("[PaymentAmount]","[Payments]","[TripID] =
> > Forms![Trips]![TripID]")
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.