Link to home
Start Free TrialLog in
Avatar of bfuchs
bfuchsFlag for United States of America

asked on

#Type! error in report

Hi Experts,

Any idea why the following works

=IIf([Shift_From_Hour]=[SFH] And [Shift_From_Minute]=[SFM] And [Shift_From_AMPM]=Nz([SFAM],""),"",[SFH] & ":" & Format([SFM],"00") & " " & [SFAM])

Open in new window


And the following gives me a #Type! error?

=IIf([Shift_From_Hour]=[SFH] And [Shift_From_Minute]=[SFM] And [Shift_From_AMPM]=Nz([SFAM],[Shift_From_AMPM]),"",[SFH] & ":" & Format([SFM],"00") & " " & [SFAM])

Open in new window


Thanks
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bfuchs

ASKER

Hi,
So what do you suggest?
Thanks,
Ben
You could apply the NZ() function to this field reference.
Avatar of bfuchs

ASKER

Actually this works
 [Shift_From_AMPM] & ""
Thank you!