Results 1 to 6 of 6
  1. #1
    smc678 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    65

    #Num! error division by 0

    Hello all. Im having issues in a report with a text box returning #Num. I have found its because of the values are 0 on one or more of the fields on the caculation. How do you work around this? =([Text475]+[Text485])/[Text455]

  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,518
    Use an IIf() and test the cryptically-named Text455 and return 0 if it's 0.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    smc678 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    65
    How would you write that?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Why don't you give it a go and we'll fix it if you can't get it right?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    smc678 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    65
    I think I got it... Thank you !! =IIf([text455]=0,0,([Text475]+[Text485])/[Text455])

  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,518
    Happy to help!
    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. Replies: 3
    Last Post: 07-31-2013, 08:46 PM
  2. Replies: 0
    Last Post: 07-16-2012, 05:42 AM
  3. Replies: 6
    Last Post: 05-30-2012, 12:32 PM
  4. division by 0
    By kwooten in forum Queries
    Replies: 5
    Last Post: 03-19-2012, 04:37 PM
  5. Division by zero error on a query
    By thorwood in forum Access
    Replies: 3
    Last Post: 05-19-2011, 07:20 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