By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.


P: 3
I need help adding to 2 seperate fields. I know this seems as simple as 1+1. However lets say field one has a name of A and has a value of "1" and field two has a name of B and has a value of 2. If i simply do in field 3 =[A]+[b] i actually get "12" instead of three. I have tried to use "Sum" but i have found that no matter what is in the first field i simply get a return value of what ever is in field with an addition of 1. Example Field A is 5 and Field B is 6 my returned result is 7 instead of 11. With the first option if i change the operator to anything but + (-,*,/) i actually get the result i want. Any help.
Oct 12 '06 #1
Share this Question
Share on Google+
2 Replies

P: 143
If it's text, you will. The addition sign will add numbers, but concatanate text. Change A and B to numbers.
Oct 13 '06 #2

Expert 100+
P: 1,221
Yes, look at your defintion of the variables. It sounds like you are concatenating strings instead of adding numbers. But you say also subtraction and division work as expected for numbers. I'd have to try that to see what happens if you do other math with strings.

You could change your [a]+[b] to CInt([a]) + CInt([b]) to force the values to Integers ... or use Clng for longs, etc....

Let us know what the outcome was.
Oct 14 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.