If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Sum Function Help Please
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. |
#2
|
|||
|
|||
Sum Function Help Please
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" wrote: 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. |
#3
|
|||
|
|||
Sum Function Help Please
Daniel - first formula worked a treat. My kind thanks to you for taking the time here. Very much appreciated. "Daniel Pineault" wrote: 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" wrote: 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. |
Thread Tools | |
Display Modes | |
|
|