Sum Function Help Please

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.
 
D

Daniel Pineault

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.
 
A

Al Morton

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.
 

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