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
> 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
[quoted text clipped - 9 lines]
> --
> srinivas
Jan Baird - 27 May 2008 20:51 GMT
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.
Jan Baird is out of the country until September 20. Every effort will be
made to respond to messages, but please be patient.