Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Sat Nov 21, 2009 5:23 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ]  Bookmark and Share
Author Message
 Post subject: Initial value of a text box VB
PostPosted: Thu Apr 30, 2009 12:02 pm 
Offline

Joined: Thu Apr 30, 2009 11:42 am
Posts: 1
Hi there,

I have an issue with an application I am writing, I get information from a database, put the values into a label, then add up all the label values.
I use the following code to intialise the labels (12 of) :

Code:
temp4 = main.ManualBonus1.contTarq2m1.Text
       If Not IsNumeric(temp4) Then _ main.ManualBonus1.contTarq2m1.Text = 0
temp4 = main.ManualBonus1.contTarq2m1.Text

I then add them up:
Code:
temp = CInt(temp1) + CInt(temp2) + CInt(temp3)....

But this is where the error occurs as sometimes they have the value "NaN" in them which stops the calulation working. The value coming in from the database is always a number.
I get the following error:

OverflowException was unhandled

the calculation is done on Form Load and if a textbox is altered, and is contained within a User Control.

Any help would be gratefully appreciated.

Cheers

Enizag


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley