Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228

    Error: overflow.


    Ive been looking into what ths error is but im failing to see a work around.

    When I enter a value over around 33000 (I've read online that is was 60k but for some reason it freaks out around 33k for me.) I may be dealing with numbers much greater than this.

    I'm just looking for suggestions of things I can look into to try or alternatives.

    Clarification: the error occurs when using SUM. I'm using Dsum in VBA which is triggering. This may not be a programming issue/solution.

    thanks, Andy

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    It sounds like you may have declared a number as an Integer. The maximum integer value is 32,767.
    Try picking a different data type, like Long Integer.
    See: https://eggerapps.at/mdbviewer/docs/en/field-types.html

    If this appears in a SUM, make sure that the underlying values you are summing are not declared as Integers.

  3. #3
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    I appreciate your response. I will spend tomorrow morning investigating it further.

    Andy.

  4. #4
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    I had a little look before I go home today. I have implemented your suggestion to the VBA and it works perfectly. BUT, there is still a problem in the backend. It saying the expression is too complex. I have been using this for quite some time with no issue. It's only a problem with large numbers. The fields in question are Quantity and Price per unit. Quantity is already long integer and Price per unit is currency. I can look into changing this field from currency to long integer and see what implications this has. Unless there are other ideas?

    Thanks.
    Click image for larger version. 

Name:	Screenshot_2.png 
Views:	15 
Size:	20.3 KB 
ID:	38255
    Click image for larger version. 

Name:	Screenshot_3.png 
Views:	14 
Size:	5.6 KB 
ID:	38256

  5. #5
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Note that Integers and Long Integers will drop decimals, so you may want to try "Double" instead.
    Also note, an error denoting an "expression is to complex" may be referring to your calculation, not your table design.

  6. #6
    Minty is online now VIP
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Just to add to Joe's comments Currency is an excellent choice for most decimal fields, as it is effectively a decimal value of upto 15 digits plus 4 decimal places.

    Single and especially Double can suffer from rounding errors in complicated expressions over lots of data.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  7. #7
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    I’ve changed it to Large number, I don’t see any option for 'double'. With Large Number it still returns a ”#Num!" but I was using numbers much larger than we would ever normally use (for testing purposes). Having now changed the numbers to return something more reasonable it is working fine.

    I'll test this using multiple rows on one report shortly but if I encounter errors, I should be able to fix them based on the advice here. Appreciate the help/replies.

    Thanks.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Overflow error
    By Thistle in forum Queries
    Replies: 6
    Last Post: 12-12-2015, 02:57 PM
  2. overflow error
    By emir in forum Access
    Replies: 5
    Last Post: 11-23-2015, 07:47 AM
  3. Overflow Error
    By jtm013 in forum Programming
    Replies: 15
    Last Post: 01-07-2015, 01:01 PM
  4. Overflow Error
    By pj33558 in forum Reports
    Replies: 1
    Last Post: 06-19-2014, 10:50 AM
  5. Overflow Error
    By mike02 in forum Programming
    Replies: 14
    Last Post: 07-12-2013, 10:53 AM

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