Make Label Visible When IsNull

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

=IIf(IsNull([SumOfPD_HRS])," " &
([Label19].[Visible]=True),diff2dates("hn",0,[SumOfPD_HRS]))

May I know how come the above syntax keep display "0" when IsNull is true.
I hope to make label19 visible if IsNull is true. Label19 is set to visible
= no at first. Could anyone guide me?
 
Seikyo,

Your IIf statement needs to evaluate a result from the
Isnull function.

Try:
=IIf(IsNull([SumOfPD_HRS])=true," " &
([Label19].[Visible]=True),diff2dates("hn",0,
[SumOfPD_HRS]))

Note the "=True" added to your function.

HTH,

Terry
 
It is still the same. A "0" is display after I typed it in. Sighx...

Terry said:
Seikyo,

Your IIf statement needs to evaluate a result from the
Isnull function.

Try:
=IIf(IsNull([SumOfPD_HRS])=true," " &
([Label19].[Visible]=True),diff2dates("hn",0,
[SumOfPD_HRS]))

Note the "=True" added to your function.

HTH,

Terry
-----Original Message-----
=IIf(IsNull([SumOfPD_HRS])," " &
([Label19].[Visible]=True),diff2dates("hn",0, [SumOfPD_HRS]))

May I know how come the above syntax keep display "0" when IsNull is true.
I hope to make label19 visible if IsNull is true. Label19 is set to visible
= no at first. Could anyone guide me?
 
Perhaps also checking for the zero-length string would solve the problem:

=IIf(IsNull([SumOfPD_HRS])=True Or [SumOfPD_HRS]=""," " &
([Label19].[Visible]=True),diff2dates ("hn",0,[SumOfPD_HRS]))

Seikyo said:
It is still the same. A "0" is display after I typed it in. Sighx...

Terry said:
Seikyo,

Your IIf statement needs to evaluate a result from the
Isnull function.

Try:
=IIf(IsNull([SumOfPD_HRS])=true," " &
([Label19].[Visible]=True),diff2dates("hn",0,
[SumOfPD_HRS]))

Note the "=True" added to your function.

HTH,

Terry
-----Original Message-----
=IIf(IsNull([SumOfPD_HRS])," " &
([Label19].[Visible]=True),diff2dates("hn",0, [SumOfPD_HRS]))

May I know how come the above syntax keep display "0" when IsNull is true.
I hope to make label19 visible if IsNull is true. Label19 is set to visible
= no at first. Could anyone guide me?
 
Back
Top