Why is this IIF logic not working ?!

  • Thread starter Thread starter AlexT
  • Start date Start date
A

AlexT

Folks,

I have a report with the detail section containing an unbound field
with the following calculation

=IIf([objDate]=0, "nothing", "Date : " &
Format([objDateSortie],"mm-yyyy"))

For some reason the field either prints

"Date :" when objDate = 0
"Date : xx-yyyy" when objDate > 0

Altough the latter is what I would expect I'm at loss to understand the
former... How should I print out "nothing" when objDate = 0 ?!

Thanks for your time

--alexT
 
Do you actually store 0 in the field objDate? Is it possible that objDate is
Null? If so, try:
=IIf(IsNull([objDate]), "nothing", "Date : " &
Format([objDateSortie],"mm-yyyy"))
 
Back
Top