07-20-2009, 12:58 PM #4 MSAccessRookie AWF VIP Join Date: May 2008 Location: Central NJ, USA Thanks, K "John Spencer" wrote: > I think that may still error. If you are posting code make sure to indent each line with four spaces. ___________________________________________________ Other subreddits of interest: /r/Excel /r/VBA /r/SQL /r/Database /r/sqlserver created by ---sniff---SQL | Interoperability | VBAa community for 4 Excel Hide Divide By 0 Error rkrause View Public Profile Find More Posts by rkrause 07-20-2009, 12:09 PM #2 pbaldy Wino Moderator Join Date: Aug 2003 Location: Nevada, USA Posts: 28,871

CyberCowView Member Profile Mar 20 2011, 02:19 PM Post#13UdderAccess Admin + UA RulerPosts: 19,539Joined: 27-April 02From: Upper MIYou're welcome Mary!« Next Oldest· Access Errors + Error Handling· Next Newest »Display Mode: Divide By 0 Error In Sql BeerarmyView Member Profile Mar 14 2011, 09:28 AM Post#8Posts: 6Joined: 14-March 11Daryl & Norie,Odid find a division formula in a source query. This is achieved with the following formula: IIf([Quantity]=0,0,[Price]/[Quantity]) Now, your Access query should no longer return an error when a [Quantity] of 0 is encountered. http://answers.microsoft.com/en-us/msoffice/forum/msoffice_access-mso_windows8/getting-an-error-in-access-query-division-by-zero/6aca4dd8-3dda-45e6-8559-c6489dc8f8c1 Thanks so much BL Reply With Quote 2014-02-18,10:23 #2 WendellB View Profile View Forum Posts Visit Homepage Super Moderator Join Date Aug 2001 Location Evergreen, CO, USA Posts 6,613 Thanks 3

I wish I could do the calculation on the sub report but is it using data on the main report for the calculation. "John Spencer" wrote: > I think you will Can't Divide By 0 thank you in advance for you help. You currently have 0 posts. So I modified yours! =IIf([Number2]= 0 or IsNull([Number2]),[Number1],[Number1]/[Number2]) Linq ;0)> This comes back to the original question (which I overlooked in my last response but was better focused on for my

Divide By 0 Error In Sql

It's quick & easy. https://bytes.com/topic/access/answers/603426-divide-0-null This is purely cosmetic as I would like my report to look neater. Divide By Zero Error Access Query You currently have 0 posts. Divide By 0 Error Java Sorry I can't be more specific at this time.

I would replace the "" with Null. > > =IIf(Nz([Ext Price Compare 1],0)=0 or Nz([Ext Price Compare > 2]),0)=0,Null,([Ext Price Compare 1]/[Ext Price Compare 2])-1) > John Spencer, May 14, http://noticiesdot.com/divide-by/divide-by-zero-error-in-vb-net.php I am going to have to go back and figure out how to restructure this forumla. Feb 16 '07 #2 reply P: 4 kashman I want to treat it as zero Feb 16 '07 #3 reply Expert Mod 10K+ P: 12,110 Rabbit You'll want to check for Sometimes the number in Number2 is a zero, which means the result of the expression is invalid and gives me "#Num!" - I understand why this is happening, but I wondered Divide By 0 Error Excel

Would have been nice if you gave us your exact expression..... Quote: I thionk you might want to treat the Null or 0 divisor as having a 0 returned value. More About Us... this page Mine took care of the problem if Number2 was Null, and yours took care of the problem if Number2 = 0, but neither took care of both possibilities!

All rights reserved. Divide By 0 Exception Java I'm not sure where else though. A blank is displayed in the report control.

Register Help Remember Me?

boblarson View Public Profile Visit boblarson's homepage! You currently have 0 posts. You may have to Register before you can post. Divide By 0 Infinity Polls Search About Us E-Books Contact Advertise Advanced Search Lounge Office Applications Databases Access 2010 division by 0 error If this is your first visit, be sure to check out the

tebule View Public Profile Find More Posts by tebule 07-21-2009, 03:38 AM #15 rkrause Newly Registered User Join Date: Sep 2007 Posts: 343 Thanks: 0 BeerarmyView Member Profile Mar 14 2011, 08:36 AM Post#3Posts: 6Joined: 14-March 11Norie,Yes it is. Mine took care of the problem if Number2 was Null, and yours took care of the problem if Number2 = 0, but neither took care of both possibilities! Get More Info Here is the formula.O&M FY10: (((([failure rate per year]*[AC TOT FP FY10]*[AVG Repair Cost per Repair])*(1-1/[Est life in years])*([Annual inflation])+(AC TOT FP FY10]*[Item cost per fy10])/[Est life in years])).

There is only one formula in the query and that formula is only adding data from another query "qryTOTFielded". So the expression in a > calculated field in query could be as follows: > > IIf(Nz([proc1],0)=0,0,Nz([rtn 1],0)/[Proc1]) > > John Spencer > Access MVP 2002-2005, 2007-2009 > The Hilltop Institute It's quick & easy. Jan 4 '08 #3 reply Expert Mod 15k+ P: 29,922 NeoPa No worries Olly.

We're a friendly computing community, bustling with knowledgeable members to help solve your tech questions. Divide by zero error trapping Browse more Microsoft Access / VBA Questions on Bytes Question stats viewed: 2643 replies: 1 date asked: Oct 16 '08 Follow this discussion BYTES.COM 2016 gemmathehuskyView Member Profile Mar 20 2011, 01:53 PM Post#12UtterAccess VIPPosts: 4,061Joined: 5-June 07From: UKthat's ok, as long as you are happy to see 0, where the estimated life is null, or Divide By Zero Divide by zero.

Mark H, May 13, 2009 #1 Advertisements fredg Guest On Wed, 13 May 2009 12:09:04 -0700, Mark H wrote: > I am trying to divide two columns and get a percentage Powered by vBulletin Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. There are at least twelve queries with forumulas that sometimes add up to zero. Any help gratefully received.

PC Review Home Newsgroups > Microsoft Access > Microsoft Access Reports > Home Home Quick Links Search Forums Recent Posts Forums Forums Quick Links Search Forums Recent Posts Articles Articles Quick I think it only needs to handle that situation.