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 / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

Formula for commissions contained in an Access table????

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jpc - 31 Jan 2006 02:20 GMT
I need to have commissions calculated a number of different ways.
I'd like the actual calculations stored in a table, ...I think.
Then the user can select which calculation to use, the code gets sucked
into....
the calculations are made and everyone is happy.

Is there a way to do this?

Table:  

ID     Desc      Calculation
1      level1      income.amount=select sum(sales.amt) where .....;
                     rate= select sales.person from salespeople where id=
'john';
                     commission.paid=income.amount * rate;
                     insert into paid.commissions values sales.person,
date, rate,  
                     income.amount, commission.paid;
DevalilaJohn - 31 Jan 2006 20:28 GMT
Take a look at the Execute method as applies to querydefs.  Your SQL
statments will mostly be in the table as you have it laid out.  You may need
to code the "where" clause on before running the query.

> I need to have commissions calculated a number of different ways.
> I'd like the actual calculations stored in a table, ...I think.
[quoted text clipped - 14 lines]
> date, rate,  
>                       income.amount, commission.paid;
 
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.