Results 1 to 5 of 5
  1. #1
    wscott is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    5

    Overflow Error: Character Limit in Control Source?

    The following calculation is giving me an overflow error. Is it possible that my calculation has too many characters? I have tried everything I can think of but nothing works.

    Code:
     
    =Sum(((IIf([goal],1,0))+(IIf([report1],1,0))+(IIf([report2],1,0))+(IIf([report3],1,0))+(IIf([report4],1,0))+(IIf([report5],1,0))+(IIf([report6],1,0)))/((IIf([participantName],1,0))*([ParticipationDue])))


  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Dividing by zero can produce that error, and it looks like your formula could result in that happening. Can it?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    wscott is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    5

    Not in this report

    I checked all of the data, and even added a field with each element of the denominator, and dividing by zero is not the issue.

  4. #4
    wscott is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2010
    Posts
    5

    Work-around

    I don't understand why placing all of the code in one control source will not work. However, I already had the numerator and denominator displayed in separate fields, so I just referenced those by name in a third control (and hid them in the footer.)

  5. #5
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Thanks for posting the solution; it may help someone down the line.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Control Source for Text Box (#error)
    By km8415 in forum Forms
    Replies: 3
    Last Post: 06-27-2010, 10:45 AM
  2. Replies: 2
    Last Post: 12-03-2009, 05:06 PM
  3. Replies: 2
    Last Post: 07-30-2009, 08:02 AM
  4. Control source and calculated values
    By meistersteff in forum Forms
    Replies: 0
    Last Post: 11-23-2007, 07:04 PM
  5. Run time error '6': Overflow
    By wasim_sono in forum Access
    Replies: 0
    Last Post: 06-22-2007, 06:44 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