Calculation in a form not entering table

G

Guest

Hi all.
I have created a form (Orders Form) to enter some data regarding orders.
This form saves the typed data into the table (Orders Table) including the
customer's ID and Order ID.
All nice and saved into the Orders Table, except from the Total field.
Furthermore, I can type any kind of data into every field in the Orders
Form, apart from the Total field where i have placed the calculation:
=[Subtotal]*[VAT]/100+[Subtotal]. Doing this, i am able to view the total
cost including the VAT.

Later on, i would like to use the Orders Table for further data withdraw.
But, without the total field, it is useless for me...
Can enyone tell me what i am doing wrong?
 
F

fredg

Hi all.
I have created a form (Orders Form) to enter some data regarding orders.
This form saves the typed data into the table (Orders Table) including the
customer's ID and Order ID.
All nice and saved into the Orders Table, except from the Total field.
Furthermore, I can type any kind of data into every field in the Orders
Form, apart from the Total field where i have placed the calculation:
=[Subtotal]*[VAT]/100+[Subtotal]. Doing this, i am able to view the total
cost including the VAT.

Later on, i would like to use the Orders Table for further data withdraw.
But, without the total field, it is useless for me...
Can enyone tell me what i am doing wrong?

You're attempting to use Access as though it were a spreadsheet.
As a general rule, do NOT store calculated data in your table.

As long as you have stored the individual data fields, such as
[Quantity], [Price], [VAT], etc., anytime you need the total amount
calculate it, in a query, or on a form, or in a report.
 
D

Douglas J. Steele

In general, computed fields should not be stored in tables.

As fellow Access MVP John Vinson likes to say "Storing calculated data
generally accomplishes only three things: it wastes disk space, it wastes
time (a disk fetch is much slower than almost any reasonable calculation),
and it risks data validity, since once it's stored in a table either the
Total or one of the fields that goes into the total may be changed, making
the value WRONG."

Create a query with that calculation in it, and use the query wherever you
would otherwise have used the table.
 
G

Guest

thank you, it worked just fine!!!

fredg said:
Hi all.
I have created a form (Orders Form) to enter some data regarding orders.
This form saves the typed data into the table (Orders Table) including the
customer's ID and Order ID.
All nice and saved into the Orders Table, except from the Total field.
Furthermore, I can type any kind of data into every field in the Orders
Form, apart from the Total field where i have placed the calculation:
=[Subtotal]*[VAT]/100+[Subtotal]. Doing this, i am able to view the total
cost including the VAT.

Later on, i would like to use the Orders Table for further data withdraw.
But, without the total field, it is useless for me...
Can enyone tell me what i am doing wrong?

You're attempting to use Access as though it were a spreadsheet.
As a general rule, do NOT store calculated data in your table.

As long as you have stored the individual data fields, such as
[Quantity], [Price], [VAT], etc., anytime you need the total amount
calculate it, in a query, or on a form, or in a report.
 
G

Guest

As fredg and you aswered, you have covered my question and it worked as i
wanted to. Thank you very much

Douglas J. Steele said:
In general, computed fields should not be stored in tables.

As fellow Access MVP John Vinson likes to say "Storing calculated data
generally accomplishes only three things: it wastes disk space, it wastes
time (a disk fetch is much slower than almost any reasonable calculation),
and it risks data validity, since once it's stored in a table either the
Total or one of the fields that goes into the total may be changed, making
the value WRONG."

Create a query with that calculation in it, and use the query wherever you
would otherwise have used the table.


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


alexandros said:
Hi all.
I have created a form (Orders Form) to enter some data regarding orders.
This form saves the typed data into the table (Orders Table) including the
customer's ID and Order ID.
All nice and saved into the Orders Table, except from the Total field.
Furthermore, I can type any kind of data into every field in the Orders
Form, apart from the Total field where i have placed the calculation:
=[Subtotal]*[VAT]/100+[Subtotal]. Doing this, i am able to view the total
cost including the VAT.

Later on, i would like to use the Orders Table for further data withdraw.
But, without the total field, it is useless for me...
Can enyone tell me what i am doing wrong?
 

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