Adding Numeric TextBox Values
I am designing a custom Outlook form and as part of my validation (using vbscript) I have certain fields which can only be numeric:
Amount01, Amount02, Amount03, Amount04, Amount05 and TotalAmount (which is read only and adds to total of Amount01-5).
- TotalAmount has a calculation in it's field property which is [Amount01] +[Amount02] etc etc
However as part of validation testing, when I put in text into either of the Amount0(#) fields, it doesn't return an error for the IsNotNumeric function. Hence I have had to change the properties of these fields to text from number, and now get an error message as desired when a letter is typed in.
Unfortunately now, instead of adding the Total of Amount01-5 together, it adds them one after the other in Total Amount. So what should be 2+2+2+2+2 = 10 in Total Amount, is now 22,222.
|