Overflow error

tstoneh

Board Regular
Joined
Feb 2, 2004
Messages
126
Does anyone know what happens when you get an "overflow error"? How do you fix something like that?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Entering a numerical value into a data type which is larger than that data type can handle will produce an overflow error. Division by zero can also do this. If it's the first, go into the table, go to the field in question, and look at what the type is set to. The Double data type is the largest numerical data type that MS Access has to offer.
 
Upvote 0
OK division by zero is probably the cause. What are the exact steps to correct this error?
 
Upvote 0
What are you doing that is creating the 'Overflow' error?
 
Upvote 0
Could you post that formula and maybe an example of the data that is giving you trouble?
 
Upvote 0
An example of the formula would be very simple (25-0)/0. I am just trying to fiigure out how to get rid of the error. In Excel you can do an iserror() type statement but in Access, which I am not as familiar with, I should be able to get rid of the error somehow. Any suggestions?
 
Upvote 0
Could you actually post the formula?

You could use something like this:

MyCalc:Iif([Field1]<>0, [Field2]/[Field1], 0)
 
Upvote 0
Here you go

SELECT [Fiscal 2005 Price File OFFICIAL V1].NIIN, [Fiscal 2005 Price File OFFICIAL V1].[ACT-CD], [Fiscal 2005 Price File OFFICIAL V1].[2005 LAC], [FY04 Std Exc LAC LRC].[2004 LAC Amt], [Fiscal 2005 Price File OFFICIAL V1]![2005 LAC]-[FY04 Std Exc LAC LRC]![2004 LAC Amt] AS [LAC Difference], ([Fiscal 2005 Price File OFFICIAL V1]![2005 LAC]-[FY04 Std Exc LAC LRC]![2004 LAC Amt])/[FY04 Std Exc LAC LRC]![2004 LAC Amt] AS [LAC % Change], [Fiscal 2005 Price File OFFICIAL V1].[2005 LRC], [FY04 Std Exc LAC LRC].[2004 LRC Amt], [Fiscal 2005 Price File OFFICIAL V1]![2005 LRC]-[FY04 Std Exc LAC LRC]![2004 LRC Amt] AS [LRC Difference], ([Fiscal 2005 Price File OFFICIAL V1]![2005 LRC]-[FY04 Std Exc LAC LRC]![2004 LRC Amt])/[FY04 Std Exc LAC LRC]![2004 LRC Amt] AS [LRC % Change]
FROM [Fiscal 2005 Price File OFFICIAL V1] INNER JOIN [FY04 Std Exc LAC LRC] ON [Fiscal 2005 Price File OFFICIAL V1].NIIN = [FY04 Std Exc LAC LRC].NIIN
WITH OWNERACCESS OPTION;
 
Upvote 0
[FY04 Std Exc LAC LRC]![2004 LAC Amt])/[FY04 Std Exc LAC LRC]![2004 LAC Amt]
A Statement like this would produce an overflow error if your denominator field (in this case [FY04 Std Exc LAC LRC]![2004 LAC Amt]) were 0. As Norie stated, wrapping an Iif function around this to first test for a denominator of 0 would do the trick. The Iif function basically takes a statement and returns one value if it is true, another value if that statement is false:

Code:
Iif([FY04 Std Exc LAC LRC]![2004 LAC Amt]=0,0,FY04 Std Exc LAC LRC]![2004 LAC Amt])/[FY04 Std Exc LAC LRC]![2004 LAC Amt])

Would return 0 if the denominator is 0. If not, it will return the percentage that you're looking for.
 
Upvote 0

Forum statistics

Threads
1,221,827
Messages
6,162,202
Members
451,752
Latest member
freddocp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top