Using IsError And IIf

Feb 27, 2006

I am querying a date field which in some few cases do not have dates and hence I'm getting #Error.

I am trying to use a combination of the IIf and the IsError functions in order to produce a null or "" value instead of #Error. Here's what I am trying in a select query but I still get the same result?

STARTDATE: IIf(IsError(CDate([DFIT])),"",CDate([DFIT]))

View Replies


ADVERTISEMENT

Iserror

Aug 24, 2007

Hi

In excel you can use ISERROR to account for errors, for example 0 / 0. Is there an alternative in Access!

Thanks in advance.........

View 3 Replies View Related

Iif Iserror With Multiplication

Nov 8, 2006

I'm trying to create an expression field in my query that multiplies 2 fields that are in the query. Here is the code I'm using...

NTA#: IIf(IsError([HeaderProductionQuantity]*[NTA]),0,[HeaderProductionQuantity]*[NTA])

The quantity field has the amount of pieces that we produced in a given day. The NTA field is a number 1-4 and blank that show the amount of pieces that require the NTA job.

As long as there is a number in the nta field, I get a good calculation. If the nta field is blank, I get #error in the query. What is wrong with the above formula that it isn't replacing the #error with 0?

If I put the 0 at the end of the formula, it replaces the good calcs with 0,so the formula is correct, correct?

View 5 Replies View Related

Queries :: How To Properly Use IsError In Query

Mar 13, 2015

I want this query to count all of the different types of order (Clase de Orden) and if a type of order isn't found, to return zero. How do I do this using IsError, since when it doesn't find an order, it gives me an error. This is the query:

TRANSFORM Count([E 025].Porcin) AS CountOfPorcin
SELECT[Listado de Empleados].Supervisor, [E 025].[Alias de TP], [E 025].Usuario, Telfonos.Telefono, Count([E 025].Porcin) AS [Total Of Porcin]
FROM Telfonos INNER JOIN ([Listado de Empleados] INNER JOIN [E 025] ON[Listado de Empleados].[Codigo de Usuario] = [E 025].Usuario) ON

[code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved