total result in text boxes

  • Thread starter Thread starter iccsi
  • Start date Start date
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,
 
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.
 
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,
 
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,
 
Back
Top