I have a VBA code which picks values from a form, performs calculations on them and then inserts them into a text field in a table.
part of the code is:
AUTO_NO_ads = Me.list_LOOPS_AVAIL_ads.Column(1, varItm_ads)
DWG_ID_ads = Val(1000000 * Me.cbo_SHT_ads) + AUTO_NO_ads + 10000000
The problem occurs as the variable DWG_ID_ads exceeds 7 digits (because of 10000000 added) and then when I use the toggle breakpoint it is evaluated as say 1.800095E+07(exponential format)
How can I store it in the table in standard format i.e. 18000950 and not in the exponential format above. The variable has to be 8 digits long. I've tried CLng but that doesn't help. Any suggestions?
P.S. If I donot add 10000000 then it works fine for 7 digits, but not for 8.
part of the code is:
AUTO_NO_ads = Me.list_LOOPS_AVAIL_ads.Column(1, varItm_ads)
DWG_ID_ads = Val(1000000 * Me.cbo_SHT_ads) + AUTO_NO_ads + 10000000
The problem occurs as the variable DWG_ID_ads exceeds 7 digits (because of 10000000 added) and then when I use the toggle breakpoint it is evaluated as say 1.800095E+07(exponential format)
How can I store it in the table in standard format i.e. 18000950 and not in the exponential format above. The variable has to be 8 digits long. I've tried CLng but that doesn't help. Any suggestions?
P.S. If I donot add 10000000 then it works fine for 7 digits, but not for 8.