Total Field?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table that has two fields that need to be multiplied together to
creat a third field.
EX:
Hours Worked Pay Total
40 10.00 $400.00
10 11.00 $110.00

What is an easy way to have the Total field automatically update?
 
Your question implies that you want the Total to appear in a table. You
don't want to store a calculated value in a field in a table.

Just create a query with your two fields Hours Worked and Pay. Then in an
empty column of the grid put

Total: [Hours Worked] * [Pay]

Any time you run the query, or a report or form based on the query, you get
the correct information.
 
Hey amurphy, as a good coding practice or database design, you don't want to
store calculated information b/c it can always be calculated on the fly. In
a query, enter the following as the field:

[Total]: ([Hours Worked]*[Pay])

This information can always be calculated in a report or a form.
 
Create a query, and add another field that will perform the calculation

'In SQL
Select [Hours Worked], Pay , [Hours Worked] * Pay As Total From TableName

In Query Design, add a field in the field section

Total: [Hours Worked] * Pay
 

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

Back
Top