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"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top