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

J

Jpc

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;
 
D

DevalilaJohn

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.
 
Top