URGENT - If Clause - I think

  • Thread starter Thread starter Colleen
  • Start date Start date
C

Colleen

I have a report based off a parameter query.

I want it to look at the [E-Supervisor] field and if it is
null then use the [supervisor] field.

I have tried to enter this into the report as well as the
query.

=IIf(IsNull([E-ACTIONS].[E-Supervisor]),[zlkup-tmgp].
[supervisor])

Thank you.

Colleen
 
I have almost the exact issue. Here is what we use in queries and such.
Maybe you can change it around to fit your application...

Assignment Supervisor: IIf([tblAssignments]![RecordSupervisor] Is
Null,[tblEmployeeData]![SupervisorID],[tblAssignments]![RecordSupervisor])
 
Thank you that worked great I always forget the last bit.

-----Original Message-----
I have almost the exact issue. Here is what we use in queries and such.
Maybe you can change it around to fit your application...

Assignment Supervisor: IIf([tblAssignments]! [RecordSupervisor] Is
Null,[tblEmployeeData]![SupervisorID],[tblAssignments]! [RecordSupervisor])


I have a report based off a parameter query.

I want it to look at the [E-Supervisor] field and if it is
null then use the [supervisor] field.

I have tried to enter this into the report as well as the
query.

=IIf(IsNull([E-ACTIONS].[E-Supervisor]),[zlkup-tmgp].
[supervisor])

Thank you.

Colleen


.
 
I have a report based off a parameter query.

I want it to look at the [E-Supervisor] field and if it is
null then use the [supervisor] field.

I have tried to enter this into the report as well as the
query.

=IIf(IsNull([E-ACTIONS].[E-Supervisor]),[zlkup-tmgp].
[supervisor])

Thank you.

Colleen

The IIF statement requires THREE arguments: a logical expression, the
value to return if that expression is TRUE, and the value to return if
it's FALSE. You've left off the last:

IIF((IsNull([E-ACTIONS].[E-Supervisor]), [zlkup-tmgp].[supervisor],
[E_ACTIONS].[E-Supervisor])

Or, more simply, you can use the NZ() function which returns its
second argument if the first argument is NULL:

=NZ([E-Supervisor], [supervisor])
 
Back
Top