total result in text boxes

I

iccsi

I have 7 text boxes on the report and would like to add all results to
the final result text box using following code.

It works [FINAL RESULT].Value = [RESULT 1].Value, but it does not work
to add them together like following.

[FINAL RESULT].Value = [RESULT 1].Value + [RESULT 2].Value + [RESULT
3].Value + [RESULT 4].Value + [RESULT 5].Value + [RESULT 6].Value

I use break point to see what are the values. All values exist, but
Final Result is null.

Any information is great appreciated,
 
B

Bill

Try using the =SUM(field1 + field2 + ..................fieldn)
as the control source of the TB property.

Bill
 
D

Duane Hookom

Why are you using any code? Can't you use an expression in your total text
box like:
=Nz([Result 1],0) +Nz([Result 2],0) +Nz([Result 3],0) +Nz([Result 4],0) + ...

I'm not sure how your data is structure but these field names suggest a need
to normalize.
 
I

iccsi

Why are you using any code? Can't you use an expression in your total text
box like:
=Nz([Result 1],0) +Nz([Result 2],0) +Nz([Result 3],0) +Nz([Result 4],0)+ ...

I'm not sure how your data is structure but these field names suggest a need
to normalize.
--
Duane Hookom
Microsoft Access MVP



iccsi said:
I have 7 text boxes on the report and would like to add all results to
the final result text box using following code.
It works [FINAL RESULT].Value = [RESULT 1].Value, but it does not work
to add them together like following.
[FINAL RESULT].Value = [RESULT 1].Value + [RESULT 2].Value + [RESULT
3].Value + [RESULT 4].Value + [RESULT 5].Value + [RESULT  6].Value
I use break point to see what are the values. All values exist, but
Final Result is null.
Any information is great appreciated,- Hide quoted text -

- Show quoted text -

Thanks for help,
Because it will be too complex SQL query to do in the query, I have
text box unbound and do calculations on the report.

I understand that If it shoud do all the data from query and use bound
text box to link them.

In my case, If I do the query to get all data result then the query
will too complex.


Thanks again,
 
D

Duane Hookom

There was nothing in any of my replies about calculating this in the query.
Read it again.

--
Duane Hookom
Microsoft Access MVP


iccsi said:
Why are you using any code? Can't you use an expression in your total text
box like:
=Nz([Result 1],0) +Nz([Result 2],0) +Nz([Result 3],0) +Nz([Result 4],0) + ...

I'm not sure how your data is structure but these field names suggest a need
to normalize.
--
Duane Hookom
Microsoft Access MVP



iccsi said:
I have 7 text boxes on the report and would like to add all results to
the final result text box using following code.
It works [FINAL RESULT].Value = [RESULT 1].Value, but it does not work
to add them together like following.
[FINAL RESULT].Value = [RESULT 1].Value + [RESULT 2].Value + [RESULT
3].Value + [RESULT 4].Value + [RESULT 5].Value + [RESULT 6].Value
I use break point to see what are the values. All values exist, but
Final Result is null.
Any information is great appreciated,- Hide quoted text -

- Show quoted text -

Thanks for help,
Because it will be too complex SQL query to do in the query, I have
text box unbound and do calculations on the report.

I understand that If it shoud do all the data from query and use bound
text box to link them.

In my case, If I do the query to get all data result then the query
will too complex.


Thanks again,
 

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