Multiply Fields

D

dan.cawthorne

Hi All,

Please can some assist me in been able to Multiply Columns

What im doing is im creating a simply estimating database

Ive Created a Table With Following Field (Item, Qty, Decription, Unit
Cost, Total Cost, Unit Hour Total Hours)

What I Want to be able to do is in the Total Columns Have the Unit Cost
Mutiplied and Unit Hour Multiplied by the Quantie Filed for that Record
Line?

This is Created as a Dataform which is used as a Sub form.

Then on the Main Form I Want A Field that Shows all Calculated Total
Costs abd Total Labour.

Somethink like Excel Spread Sheet?

Can You Help?
 
M

Marshall Barton

Please can some assist me in been able to Multiply Columns

What im doing is im creating a simply estimating database

Ive Created a Table With Following Field (Item, Qty, Decription, Unit
Cost, Total Cost, Unit Hour Total Hours)

What I Want to be able to do is in the Total Columns Have the Unit Cost
Mutiplied and Unit Hour Multiplied by the Quantie Filed for that Record
Line?

This is Created as a Dataform which is used as a Sub form.

Then on the Main Form I Want A Field that Shows all Calculated Total
Costs abd Total Labour.

Somethink like Excel Spread Sheet?


You defintely DO NOT want to do this to a field in the
table.

Instead, you can use a calculated field in the subform's
record soure query:
SELECT table.*,
table.Quantity * table.[Unit Cost] As [Total Cost],
table.Quantity * table.[Unit Hour] As [Total Hours]
FROM table
WHERE . . .

Then the subform can display the calculated value by simply
binding a text box to the calculated field.

You can calculate the total in the subform's Header/Footer
section by using a text box with the expression:
=Sum([Total Cost])

Alternatively, If you do not have a convienient way to
change the query, you can use a subform text box in the
detail section to calculate the value:
=Quantity * [Unit Hour]
With this approach the subform header/footer total text box
would use the expression:
=Sum(Quantity * [Unit Hour])
 

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