calculate tax

S

Sean

I have a database with a table in it.

There are three columns
They are Gross, Net & Vat

How can I get it to calculate the Net and Vat values by entering the total
gross amount

I have tried =Nz([gross]*0.115)
but this isn't working
I put this in the default value field

Can anyone help
 
J

John W. Vinson

I have a database with a table in it.

There are three columns
They are Gross, Net & Vat

How can I get it to calculate the Net and Vat values by entering the total
gross amount

I have tried =Nz([gross]*0.115)
but this isn't working
I put this in the default value field

Can anyone help

Neither the net nor the VAT fields should *EXIST*.

Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or in the control source of a Form or a Report
textbox.

A Default value will apply only to newly created records at the instant the
record is created, and therefore cannot reference the Gross field, since it
has no value at that instant.
 
S

Sean

Is there anyway that I can create a query or report that will calculate it
for me or should I export the data into excel for example and do it there

I want to make it as simple and easy for the operator to use without too
many steps

John W. Vinson said:
I have a database with a table in it.

There are three columns
They are Gross, Net & Vat

How can I get it to calculate the Net and Vat values by entering the total
gross amount

I have tried =Nz([gross]*0.115)
but this isn't working
I put this in the default value field

Can anyone help

Neither the net nor the VAT fields should *EXIST*.

Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or in the control source of a Form or a Report
textbox.

A Default value will apply only to newly created records at the instant the
record is created, and therefore cannot reference the Gross field, since it
has no value at that instant.
 
J

John W. Vinson

Is there anyway that I can create a query or report that will calculate it
for me

Of course; either!

In a query just type

VAT: Nz([gross])*0.115

in a vacant Field cell. On a form or report, set the Control Source of a
textbox to

=Nz([gross])*0.115

The same can be done with any other needed expression.
 

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

Similar Threads

Getting a total in $ 2
Access Query problem 1
Please help - formula for percentage 2
calculating a sum that contains a 0 or no data 6
Fuel VAT Calculations 5
Get data from User using msgbox 1
Calculations in Tables 4
1p out again! 5

Top