View Full Version : Ignore #Error


laxster
01-19-2010, 08:43 AM
I have a query which calculates results from varioius cells. Some of these cells will legitimately have #Error values in them.

At the end, all the calculations are tallied together to return a final result. How can I tell Access to ignore #Error, or to recognize it as a null value?

gemma-the-husky
01-19-2010, 08:53 AM
how do they legitimately have an error?

a null propagates to a blank - so an error generally represents either an invalid calculation - such as doing numeric calculations with text - or divide by zero errors

so the way to do it, is to test for these items in the query - and exculde any items that will produce such an error

all of this means you need to understand what is wrong with your data, that is causing the errors

laxster
01-19-2010, 10:25 AM
Well, basically, it is multiplying one column which uses a combo that queries against a database to pull values. These numeric values all have labels (lbs., kg, etc). The combo box records the value to a table.

Because of the text involved, I cannot have that part of the table be numeric, so I am using the val() function to ignore the text.

All the amounts and weights are multiplied together to provide the total for that line entry. Then all the line entries should be added together to provide a total weight for the entire pallet.

Brianwarnock
01-19-2010, 10:28 AM
That does not explain the legitimate error.

Brian

laxster
01-19-2010, 01:22 PM
Well, for some reason it appears that Access won't compute a blank cell with nothing in it, so I defaulted any unfilled cells to 0 and now it works!