Calculating the sum of 3 fields

C

carrol

I have three fields with dollar amounts in them. I want to calculate those
three fields and put the number in another field.

Thank you.
 
M

Mike Painter

carrol said:
I have three fields with dollar amounts in them. I want to calculate
those three fields and put the number in another field.

Thank you.

Not a good idea, a calculated field in a query is the better choice
MySum: [field1]+ [field2] +[field3]

In a form you will need essentially the same code in the after update events
for each of the three fields.
Me!MySum = [field1]+ [field2] +[field3]
Leave this out of one or create another form where the values can be changed
or work at the table level and you have a *very* hard to find problem.
 
C

carrol

I don't understand what you're talking about.

I am using the table information to merge a document in word. Can I create
a query (the way you say) and use it for a word merged document?

Mike Painter said:
carrol said:
I have three fields with dollar amounts in them. I want to calculate
those three fields and put the number in another field.

Thank you.

Not a good idea, a calculated field in a query is the better choice
MySum: [field1]+ [field2] +[field3]

In a form you will need essentially the same code in the after update events
for each of the three fields.
Me!MySum = [field1]+ [field2] +[field3]
Leave this out of one or create another form where the values can be changed
or work at the table level and you have a *very* hard to find problem.
 
D

Douglas J. Steele

Yes, your query can have calculations in it.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



carrol said:
I don't understand what you're talking about.

I am using the table information to merge a document in word. Can I
create
a query (the way you say) and use it for a word merged document?

Mike Painter said:
carrol said:
I have three fields with dollar amounts in them. I want to calculate
those three fields and put the number in another field.

Thank you.

Not a good idea, a calculated field in a query is the better choice
MySum: [field1]+ [field2] +[field3]

In a form you will need essentially the same code in the after update
events
for each of the three fields.
Me!MySum = [field1]+ [field2] +[field3]
Leave this out of one or create another form where the values can be
changed
or work at the table level and you have a *very* hard to find problem.
 
Top