Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2006, 05:46 AM
Registered User
 
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

 
Old December 18th, 2006, 07:59 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hai,
try to add cint(2)+cint(2)+cint(2)+cint(2)+cint(2)

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
numeric only textbox Hughesie78 Classic ASP Basics 7 December 5th, 2007 10:58 AM
DataGridViewTextBoxEditingControl adding numeric t dzisaacs C# 2005 0 August 14th, 2007 02:48 PM
HELP!! Numeric Textbox value quentinuys HTML Code Clinic 3 December 18th, 2006 08:04 AM
numeric format for a textbox Rudner Beginning VB 6 1 November 9th, 2004 02:29 PM
Impure numeric values passed to MAX() Daniel Walker PHP Databases 4 April 8th, 2004 03:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.