Access2000 IIF -STATEMENT

  • Thread starter Thread starter jack-geronimo
  • Start date Start date
J

jack-geronimo

Why this will not function in Access2000


IiF (
[bei_aktiv_datum] <=Now() and [bei_archiv_datum] >=Now(),1,
IiF(
[bei_aktiv_datum]="", 1, 0
)
)
As SortOrder

if i do the second compare with a access function like Date() or now
everything is allright but the snippet above alway writes only a
'#Fehler' (in english #Error) in this Field.

I appreciate your help, thank you
 
Are you aware of Null?

If [bei_aktiv_datum] is Null, the criteria for the outer
IIf will give you error, AFAIK.

It looks to me that you compare a Date value to a String
in the criterion for the inner IIf which I wouldn't trust.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top