Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculating vat

Status
Not open for further replies.

welshspoon

Technical User
Dec 14, 2002
34
GB
i want to calculate the vat a customer has paid on their goods. I've been advised to use a query when doing this. However, i am unsure what to write into the query for it to calculate how much vat has been paid.

please help me
 
welshspoon:

You can achieve your results in at least two ways.

1) By creating a query, which has all the fields from the table containing the sale price, which you need to show on a report. Then in the Field: row of a blank column in the query grid you would but your version of the following:

Vat:[name of sale price field(before vat) * vat decimal

As an example if the vat was 10%: Vat:[PriceofGoods] * 0.10

2)You can add a textbox directly on your form or report where its Control Source is:
=[name of field for price] * vat decimal

Neither way stores the calculated value in the database. One of the cardinal rules of database design: never store calculated data, it can always be extracted with the correct algorithm.

HTH,

Vic
 
This sounds pretty straight forward (hopefully)

I believe VAT can range from 15% to 25%. So, add a text box and call it [VAT_rate]. Then add another field called [VAT_Owing]. Then simply take the value a customer paid and do the calculation...lets assume you used [Customer_Paid] as what a customer has paid.

Now, in your [VAT_Owing] 'Control Source' add the following:

=[Customer_Paid] * [VAT_rate]

Just remember that if you make [VAT_rate] a percentage you should be entering values from 0 to 1 NOT 1 to 100 (unless of course you add a percent sign on the end)
[yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top