I need help!!!

break_me

New member
Local time
Today, 10:22
Joined
Aug 6, 2003
Messages
9
I'm trying to sum up 3 differnt fields in my report. I used the expression =[field name 1]+[field name 2]+[field name 3] but it's not working. whenever I try to get out of the design view it keeps asking me for a value for each field on my expression. What am I doing wrong??? PLEASE HELP ME! Thanks in advance.
 
Check your spelling - are the controls you are referencing spelt correctly?

Check the recordsource - are all fields included in the underlying query?
 
I double and tripled check the spelling and yes all 3 are part of my query.
 
On your report do you have textboxes that you are displaying these Fields1, 2, & 3 fields in?

Are you using these textboxes in the expression? Have you given them a prefix (typically txt) to differentiate them from the underlying fields.

Bound these textboxes?

=[txtField1] + [txtField2] +[txtField3]



You may find that if the fields hold 3, 15, and 2 respectively you'll get the result: 3152.


Therefore:

=Val([txtField1]) + Val([txtField2]) + Val([txtField3])
 
I tried both of them and both times it is still asking me for a parameter value everytime I try to get out of design view.
 
Is there a way to just do this on my query instead of the report? Thanks again!
 
break_me said:
Is there a way to just do this on my query instead of the report? Thanks again!


Yes.

In the query design grid, create a new field (just by using one of the blank columns)

i.e.

NewField: [Field1] & [Field2] & [Field3]
 
Hi

Yes you can do this in the query, something like

total: fieldname1 + fieldname2 + fieldname3

in the top line of a new column

then put total into your report.

As a thought, are the fields you are trying to sum actually on the report, or just in the field list?

The fields have to actually be on the report before they can be summed, if you dont want to see them, put them on the report and set the visability to no.

Hope this helps

Sue
 
yes, all the fields are actually on my report. That's the reason why I dont understand why it's not summing it up. Thanks again for your help!
 
Is it possible, perchance, that all of the fields in the calculation have values?
 

Users who are viewing this thread

Back
Top Bottom