Sum Function Help Please

  • Thread starter Thread starter Al Morton
  • Start date Start date
A

Al Morton

I have created two Option Groups, setting up values against the radio buttons.
The output from both boxes works fine (thanks to the Wizard), however when
I'm creating a formula on the report, I'm unable to add the two returned
values together.

If I type in =([Q1]+[Q2]) then I get both numbers concatenated together
(ie returned value from Q1 is 1 and returned value from Q2 is 2, the answer
I get is 12 !!!!.)

Interestingly if I enter =([Q1]-[Q2]) then I get the correct answer.

Any help would be greatly appreciated here.
 
I could be wrong, but it seems like access isn't understanding that the
fields are numeric values. Perhaps you could try something like:

=CDbl([Q1])+CDbl([Q2])
or
=CInt([Q1])+CInt([Q2])
....

Use the appropriate conversion based on your data.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
Daniel - first formula worked a treat. My kind thanks to you for taking the
time here. Very much appreciated.

Daniel Pineault said:
I could be wrong, but it seems like access isn't understanding that the
fields are numeric values. Perhaps you could try something like:

=CDbl([Q1])+CDbl([Q2])
or
=CInt([Q1])+CInt([Q2])
...

Use the appropriate conversion based on your data.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



Al Morton said:
I have created two Option Groups, setting up values against the radio buttons.
The output from both boxes works fine (thanks to the Wizard), however when
I'm creating a formula on the report, I'm unable to add the two returned
values together.

If I type in =([Q1]+[Q2]) then I get both numbers concatenated together
(ie returned value from Q1 is 1 and returned value from Q2 is 2, the answer
I get is 12 !!!!.)

Interestingly if I enter =([Q1]-[Q2]) then I get the correct answer.

Any help would be greatly appreciated here.
 
Back
Top