Addition in Formulas in Custom Outlook Form

  • Thread starter Thread starter Amy
  • Start date Start date
A

Amy

I'm trying to add the values of two fields together. I
have no problem multiplying, subtracting and dividing, but
I can't figure out how to add.

In the Edit formula text box, I can enter the following
(and it works):
[field1] * [field2]

but when I try [field1] + [field2] it takes the two values
and puts them side by side ie. if I'm adding 10 and 20,
the result in 1020.

I would really appreciate it if anyone can let me know
what I'm doing wrong. Thanks!
 
I would really appreciate it if anyone can let me know
what I'm doing wrong. Thanks!
Its probably just a typo in the message, but the spaces you have around
the + operator may be causing the problem. You notice you don't have
them in the multiplicative example.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 
Yes it was just a typo - I've tried several times with a
space and without a space, and with the + it still doesn't
seem to work.

Thanks,
Aimee

-----Original Message-----
I would really appreciate it if anyone can let me know
what I'm doing wrong. Thanks!
Its probably just a typo in the message, but the spaces you have around
the + operator may be causing the problem. You notice you don't have
them in the multiplicative example.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp? FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA


.
 
Sounds like you created those properties as text properties, not as numeric. If so, you'll need to convert them to numerics in order to be able to add them:

CInt([field1]) + CInt([field2] )

If they're not integers, then use the appropriate conversion function.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top