srinivas

S

Srinivas

I have designed a form there are two fields called actual payment [AP] and
commission [comm] the scenario is like this if [AP] is from 1 to 25000 - the
bank will charge 25
as commision [comm] (THE FORMULA I WANT TO ENTER IN [COMM] and from 25001 to
50000 - 50 then after 50001 to 55000 - 55 and
55001 to 60000 - 60, 60001 to 75000, 75..........etc i want formula up
100000. But if nothing
there like 0 it should display "0"

Can any one help me please
 
E

Evi

Create a table (TblCommission) for your commission with the fields MinComm,
MaxComm, CommRate where you can enter eg 25001, 50000, 50 then 50001,
55000,55
In your form, in the AfterUpdate event of the AP field, use code like this

Dim MyComm as Double

MyComm = NZ(DLookup("[CommRate]","TblCommission", "[MinComm]<=" & [AP] & "
AND [MaxComm]>=" & [AP]),0)
Me.Comm = MyComm

You correctly surmised that you need to store this result in your table
because commissions can change.

Evi
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 
J

Jan Baird

Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top