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