View Full Version : I need help!!!


break_me
08-21-2003, 01:30 PM
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.

Mile-O
08-21-2003, 01:34 PM
Check your spelling - are the controls you are referencing spelt correctly?

Check the recordsource - are all fields included in the underlying query?

break_me
08-21-2003, 01:40 PM
I double and tripled check the spelling and yes all 3 are part of my query.

Mile-O
08-21-2003, 01:46 PM
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])

break_me
08-21-2003, 01:57 PM
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.

break_me
08-21-2003, 02:01 PM
Is there a way to just do this on my query instead of the report? Thanks again!

Mile-O
08-21-2003, 02:15 PM
Originally posted by break_me
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]

suepowell
08-21-2003, 02:15 PM
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

break_me
08-21-2003, 02:23 PM
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!

Mile-O
08-23-2003, 03:07 AM
Is it possible, perchance, that all of the fields in the calculation have values?