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 / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

srinivas

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Srinivas - 26 May 2008 08:51 GMT
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

Signature

srinivas

Evi - 26 May 2008 12:12 GMT
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 - 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.
 
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.