MPAA | Myspace Layouts | Home Loan | Property for sale in Spain | Bad Credit Loan
ms access [Archive] - PCMech Forums

PDA

View Full Version : ms access


easg
02-05-2003, 02:34 PM
Is it possible to create a report in ms access that calculates a porcent based on total, but that at determined value change the porcent? for example all the sales before 200,000 wins 1.5 % of commission, and all the sales after 200,001 wins 2% of commission, all this detailed per invoice, but summin the values of each invoice in a runningsum, and the porcent based in this object.

doctorgonzo
02-05-2003, 02:59 PM
Yes, you could calculate varying levels of commission; the quick and dirty way would be to use an IIf as the data source for the text box on the form with something like this: =IIf([sales]>200000, ([sales]-200000)*.02+3000, [sales]*.015)

That would calculate the commission based on a 1.5% rate for the first $200,000 and 2% rate on any sales thereafter.

You can also do a running sum with the Sum() function.

easg
02-05-2003, 06:11 PM
I canīt use forms because the data comes from a external odbc database (a m-sdos based database), I need to use the code in the report in order to do this.

easg
02-05-2003, 06:15 PM
Sorry I clic before ending the reply.

there could be more than two commission rates.