Log in

View Full Version : Run time error '6': Overflow



wasim_sono
06-27-2007, 06:11 AM
Dear All

I'm facing problem while running form. the form has linked with a table.
This table has a field named 'amount'. the data type of this field is double.I need to put values upto 99 Lacs with two digit decimal places. But as I entered the amount greater than 40,000/ there was a message pop up having message Run time error '6': Overflow.

What should I do for the solution?

I think I' making mistake in field data type.

The requirement is that the amount should be upto 99 lacs i.e. 9900000.00 with two digit decimal places.

Thanks.

Wasim

OBP
06-27-2007, 09:41 AM
Wasim, I have just used this VBA code -
Dim a As Double
a = 9900000.22
MsgBox a
Exit Sub

and it does produce an overflow error.

I have also entered 9900000.22 in to a Field set to double without a problem.

asingh
06-28-2007, 04:49 PM
Hi,

I tried the following and it is working fine...

Sub tst_nmbr_lngth()

Dim tst_nmbr As Double

tst_nmbr = 9900000.22

MsgBox "test for " & tst_nmbr

End Sub

wasim_sono
07-02-2007, 05:11 AM
Hi
Thanks all of u. I soleved the problem. Actually I used a variable in VBA as integer. I changed it as double as hint by asingh.

Thanks a lot of U and God bless all of U.

Wasim