Calculation on a From - Percentage

JPW

Registered User.
Local time
Today, 21:02
Joined
Nov 4, 2007
Messages
51
I have a form on a database that consist of many fields, and part of it has 3 fields that are:
- Recovery Price [txtrecovery]
- Storage Price [txtstorage]
- Extra Items Price [txtextra]

All of these are NET prices and I have a VAT (or sales tax in the u.s) text box that performs a calculation to work out the 17.5% VAT value of all 3 fields combined.

The name of that txt box is - [txtvat] That has worked fine but...

In the UK out VAT (sales tax) is changing from 17.5% to 15%, and the way I've made the database require a slight code change. Now bear in mind the database may not be technically correct in that it has one main form for lots of things, but I'm happy with that.

Now, each record on the form is identified by a unique job number such as '9876'. I would like to know the code/calculation for the VAT box to perform a special calculation.

I want all records after lets say '8000' to calculate at 15% the 3 field (recovery, storage and extra) and all records below 8000 to calculate at 17.5% vat. I hope that makes sense.
 
This get you started?

IIf(JobNum > 8000, .15, .175)
 
This get you started?

IIf(JobNum > 8000, .15, .175)


where in that code do I refer to the 3 txtboxes that contain the relevant price data?
[txtrecovery]
[txtstorage]
[txtextra]

The existing code in the VAT txt box is:

=[txtrecovery]*0.175+[txtstorage]*0.175+[textextra]*0.175
 
Last edited:
=([txtrecovery]+[txtstorage]+[textextra])*IIf(JobNum > 8000, .15, .175)
 
That did work, but I always want to try a slightly different approach instead of using the job number field.

I want to use the [date out] field and implememnt the 15% VAT calculation for everything over 01/12/2008.

However, it doesn't seem to be working. This is the code:

=([vatrecovery]+[vatstorage]+[vatextra])*IIf([date out]>1/12/2008,.15, .175)
 
Try

IIf([date out]>#1/12/2008#,.15, .175)
 

Users who are viewing this thread

Back
Top Bottom