If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
#Error Results in Query
Hello,
I expect my query to return some #Error results b/c there is division involved with 0. What I would like to do is create some kind of statement in the criteria that would say If result "#Error", then result should be "0". Any help greatly appreciated. Thanks. -- Sherry N. |
#2
|
|||
|
|||
Use an IIf function to produce a zero when the divisor is zero. If you show
us an example of the calculation in your query, we can suggest an example of such IIf usage. -- Ken Snell MS ACCESS MVP "Sherry N." wrote in message ... Hello, I expect my query to return some #Error results b/c there is division involved with 0. What I would like to do is create some kind of statement in the criteria that would say If result "#Error", then result should be "0". Any help greatly appreciated. Thanks. -- Sherry N. |
#3
|
|||
|
|||
You can check the field you dividing on, and if it equal to zero then return
zero, else run the devision IIf(FieldName=0,0,Field2Name/FieldName) "Sherry N." wrote: Hello, I expect my query to return some #Error results b/c there is division involved with 0. What I would like to do is create some kind of statement in the criteria that would say If result "#Error", then result should be "0". Any help greatly appreciated. Thanks. -- Sherry N. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Toolbars, Drop-Down Menus | Rick | New Users | 1 | September 21st, 2005 11:17 AM |
SQL query showing diff between actual and budget | Bon | Running & Setting Up Queries | 3 | August 25th, 2005 12:07 PM |
Nested in-line Query | laura | Running & Setting Up Queries | 0 | February 11th, 2005 12:17 AM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Display Parameter from Form on Report | sara | Setting Up & Running Reports | 10 | July 19th, 2004 04:54 PM |