Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153

    Question I am getting a "Overflow" error message when trying to run a report

    Hello, So I have a report in which I made in a "test database" so that I could then import it into the "live database" Both databases are exactly the same, I just use the "test db" to try new things before I import them into the "live db."




    My question is that I have made a new report, this report is doing some calculations such as Min, max, avg., & sum.

    I am unable to run the report in the "live db" because I am getting the "Overflow" error message.

    What am I doing wrong and how can I fix this?

    Is there anything I can post to help show what I am doing?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    One possibility is a divide by zero error. Another, if there is code, that a value in the data is too large for a variable.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Here is a relevant response posted by Marshall Barton on a different forum.

    An overflow error is when a calculation results in a number thatis too big to be stored in a field or variable. For example an Integer field can not store a value greater then 64K, so you will get an over flow when you multiply two numbers (eg. 12345 by 10000) that is greater than 64K. Another way to get an overfloe is by dividing a number by a really small value such as .00000001 and sometimes even 0.

    You may be getting these errors because you are doing something (summing or multiplying?) some numbers that were ok before, but have increased to the point of overflow. Look at the expression that produces the error and see what the calculation does so you can figure out how it generates a large result, especially check for a divisor of 0.

    Hope this is helpful.

  4. #4
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153
    If there some sort of code I can put in the report to account for "zero's" ? There will be zero's in some records but I still want to be able to run a report. How can I get past this?

  5. #5
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153
    Is there something I can post to show what it might by?

    Also, all my data types in my tables have "long integers" and all my data is anywhere from 0-500 So I don't believe it could be data type is too large... could it?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    One option

    IIf(FieldName = 0, 0, CalculationHere)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    So I don't believe it could be data type is too large... could it?
    maybe, maybe not, without knowing what your calculations are and the types of values etc, all we can do is speculate - the overflow error is as described in the posts above.

    with regards avoiding divide by zeros - the usual way is 'if value<>0 then anothervalue/value'

    you also need to treat nulls - usually with the nz function or 'if value is not null' or 'if not isnull(value)

    So you need to inspect your data

  8. #8
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153
    Quote Originally Posted by pbaldy View Post
    One option

    IIf(FieldName = 0, 0, CalculationHere)

    Where Would I put this code?

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Wherever CalculationHere is.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153
    I am unclear by what you are saying I should do. Should I place that code in my calculations field? If so what code?


    Quote Originally Posted by Ajax View Post
    maybe, maybe not, without knowing what your calculations are and the types of values etc, all we can do is speculate - the overflow error is as described in the posts above.

    with regards avoiding divide by zeros - the usual way is 'if value<>0 then anothervalue/value'

    you also need to treat nulls - usually with the nz function or 'if value is not null' or 'if not isnull(value)

    So you need to inspect your data

  11. #11
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Somewhere you have a calculation, let's say x/y. Replace that with IIf(y=0, 0, x/y)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  12. #12
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153

    Question

    ok, SO I have found THE calculation that is causing my "overflow" error... It is in the "report Footer" of my report and the calculation is "=Avg([Challenged])".

    However, This field should not show 0 if there is division by 0. This field is being feed the data from other cells.

    Here is a screen shot of my report (Everything works just fine UNTILL I add in the field "=Avg([Challenged])")

    Click image for larger version. 

Name:	Untitled.png 
Views:	18 
Size:	24.5 KB 
ID:	21415

    How can I make this so that is shows a true average, For example, the average of 0,0, & 10 should = 3.33 ([0+0+10]/3) but I am getting "overflow" error. How can I make this work to show a true average?

  13. #13
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153
    I tried this:

    =IIf([Challenged]=0,0,Avg([Challenged]))[

    But I still got the "overflow" error... what's going on?

    QUOTE=pbaldy;285723]Somewhere you have a calculation, let's say x/y. Replace that with IIf(y=0, 0, x/y)[/QUOTE]

  14. #14
    KingOf206 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Seattle
    Posts
    153
    Any suggestions?

  15. #15
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    99.9% certain the problem is with your data. Try just a single record as your recordsource and see if that works. I presume you are not using multivalue or lookup fields? Not sure it would have an effect but are your controls named correctly?

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-13-2014, 02:54 PM
  2. Suppress "Error" message following "Cancel = True"
    By GraeagleBill in forum Programming
    Replies: 7
    Last Post: 03-23-2014, 05:40 PM
  3. Replies: 22
    Last Post: 10-10-2013, 12:47 PM
  4. Replies: 8
    Last Post: 11-12-2010, 10:55 AM
  5. "Overflow" error message.
    By joeferraro2000 in forum Queries
    Replies: 0
    Last Post: 03-08-2007, 06:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums