Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

FormCalc error-arithmetic overflow/underflow

Not applicable
Does anyone know how to get rid of the arithmetic overflow/underflow error? I have a form with calculated fields that works, but I get this error every time I open it. I really don't want to send it out to customers like this. Any suggestions?
3 Replies
Not applicable
Since it is occurring when the form is first openned I'd look for some calculations (particularly division) that are being done in form load/field initialization/field change events. You could add some "message box" display of field names, event name and variable values at the beginning of the events that have calculations to determine which one(s) are running at form load time and what the values are.

My guess is that it is being triggered before one or more of the variables has a value in it. If that is the case, you will want to surround your calculation with a check to ensure that the variables are non-zero, non-null. You may even want to go as far as not running the calculation until after you know the form has been completely loaded and fields are initialized by establishing a variable that isn't set until the end of the form load process.
Level 1
Level 1

I have the same issue that involves two fields that are performing a division calculation based on other fields that are calculating.  I get the overflow error when the form opens. How do I set a default value for a number field? You also mentioned that you could establish a variable that isn't set until the end of the load process.. how would you do that for a field?

Not applicable
Thank You. The problem is fixed. I was dividing two calculated fields that were empty when the form would open. I set a default value for each and it now works.