Calculated field????????? Simple probably

V

VSNT

I have a table with number values in some columns ala

Column: Sales and its value would be lets say 1
Column: Other and its value would be 3
Column: Totals and its value should be calculated from sales and other

so Total needs to do something like this

Total=(Sales*56)+(Other+12)

Any idea how where i could do that, do i need to make a query, i dont need a
running total just a field in each row that calculate its own value????

Any Help Apreciated TNX
 
K

KARL DEWEY

Yes you need a query.
In the query design view in a blank Field row space enter ---
Total: ([Sales]*56)+([Other]+12)

If you may have fields that are null then use ---
Total: (Nz([Sales],0)*56)+(Nz([Other],0)+12)
 
J

Jeff Boyce

Generally, it isn't necessary to store "calculated" values in the table.

Use a query, unless your situation is one of those rare ones...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
V

VSNT

TNX, i built the query and works if i manualy run it but how do i get the
data back to the column row when the value fields change automaticaly.
TNX ALOT
ALLEN

KARL DEWEY said:
Yes you need a query.
In the query design view in a blank Field row space enter ---
Total: ([Sales]*56)+([Other]+12)

If you may have fields that are null then use ---
Total: (Nz([Sales],0)*56)+(Nz([Other],0)+12)

--
KARL DEWEY
Build a little - Test a little


VSNT said:
I have a table with number values in some columns ala

Column: Sales and its value would be lets say 1
Column: Other and its value would be 3
Column: Totals and its value should be calculated from sales and other

so Total needs to do something like this

Total=(Sales*56)+(Other+12)

Any idea how where i could do that, do i need to make a query, i dont need a
running total just a field in each row that calculate its own value????

Any Help Apreciated TNX
 
K

KARL DEWEY

See Jeff's comment.
If you need to store the data because it would change if calculated later
then you need to also store a date to indicate when it was valid.

Use an update query to store it in your table.

--
KARL DEWEY
Build a little - Test a little


VSNT said:
TNX, i built the query and works if i manualy run it but how do i get the
data back to the column row when the value fields change automaticaly.
TNX ALOT
ALLEN

KARL DEWEY said:
Yes you need a query.
In the query design view in a blank Field row space enter ---
Total: ([Sales]*56)+([Other]+12)

If you may have fields that are null then use ---
Total: (Nz([Sales],0)*56)+(Nz([Other],0)+12)

--
KARL DEWEY
Build a little - Test a little


VSNT said:
I have a table with number values in some columns ala

Column: Sales and its value would be lets say 1
Column: Other and its value would be 3
Column: Totals and its value should be calculated from sales and other

so Total needs to do something like this

Total=(Sales*56)+(Other+12)

Any idea how where i could do that, do i need to make a query, i dont need a
running total just a field in each row that calculate its own value????

Any Help Apreciated TNX
 

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