A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sum Function Help Please



 
 
Thread Tools Display Modes
  #1  
Old January 23rd, 2010, 03:44 PM posted to microsoft.public.access.forms
Al Morton
external usenet poster
 
Posts: 2
Default 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  
Old January 23rd, 2010, 03:56 PM posted to microsoft.public.access.forms
Daniel Pineault
external usenet poster
 
Posts: 658
Default 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  
Old January 23rd, 2010, 04:36 PM posted to microsoft.public.access.forms
Al Morton
external usenet poster
 
Posts: 2
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.