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 / Forms Programming / March 2007

Tip: Looking for answers? Try searching our database.

Help on Conditional SUM

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Perry - 28 Mar 2007 02:01 GMT
I have a table with the sales information. The form will run a query and list
the Sales and commisions earned by the sales persons. Commisions are paid
after 2 months of sales. A query is run by specifying a sales person name and
result is posted to form as shown.

        Sales : John Doe

Company   Sales     dated          Commission      Pay_date
ABC          1,000     12/1/2006           10.00       2/1/2007
ABC          2,000     1/5/2007             20.00       3/1/2007
CBA          3,500     2/2/2007             35.00       5/1/2007

Sales up-to-date :        6,500.00      <<<<< =SUM(Sales)
Commission paid:             30.00      <<<<< how to program this part
Commission pending:        35.00      <<<<< how to make this happen

Question 1. How do I calculate the commissions paid to inlcude only the paid
commsions?

Question 2. How do I calculate the commissions pending by including only
commissions to be paid in future?

Thanks for the help.
pw
Marshall Barton - 28 Mar 2007 20:08 GMT
>I have a table with the sales information. The form will run a query and list
>the Sales and commisions earned by the sales persons. Commisions are paid
[quoted text clipped - 17 lines]
>Question 2. How do I calculate the commissions pending by including only
>commissions to be paid in future?

Try something like:
    =Sum(IIf(Pay_Date <= Date(), Commission, 0)
and
    =Sum(IIf(Pay_Date > Date(), Commission, 0)

Signature

Marsh
MVP [MS Access]

 
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.