Calculations on scale fees

R

reterrig

I want to calculate demurages on Containers:
On a form I have a field "CompanyName". On the subform I have a control box
"TotalDays" (that gives the amount of total days a container is used), a
field "ContainerType" , a field "Region" and a field "FreeDays". I need to
calculate the "TotalDays" with a scale fee different for each company ,
different for each region and different for each container type and have a
total amount for all days of the specific container i.e.
Company "A" Fees:
Region "Alfa"
Container type "20"
15 days free
16-20th day $8 per day
21-25th day $16 per day
Rest days $24 per day

Company "A" Fees:
Region "Alfa"
Container type "40"
15 days free
16-20th day $8 per day
21-25th day $16 per day
Rest days $24 per day

etc
I am not quite sure how I can create this so I can have the total amount per
container shown in the subform. Your kind assistance is appreciated.
Rgds
Peter
 
K

Klatuu

First, you need a Fees table that has the information you need:
Company
Region
ContainerType
Fee1to15
Fee16to20
Fee21to25
Fee26plus

Now, you need a function that will calculate the fees based on the
information you have using the above table structure.

To display the total fees for the subform, you can create a control in the
subform's footer section that sums the cacluated fees. Assuming the subform
is a datasheet view, you wont see the footer section, so you put another
control on the main form that display the value of the control where you sum
the fees.
 
K

Klatuu

Yes, but I am really wrapped up this moring. If I don't get back to you
this afternoon, I will get it for you on Monday.
 

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