if statement for blank cells

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jkozik
    New Member
    • Jul 2008
    • 1

    if statement for blank cells

    I am trying to write a iif statement that returns "0" if the cell is blank, otherwise a "1". For some reason this filter returns only 1's regardless of whether the cell is field is blank or not.

    1Acct Processing: IIf([Unsecuritizable Assets Table]![account processing status]="",0,1)

    I know this is a basic problem, but I have been playing with it for a while and am a novice user of access. Thanks in advance.
  • hjozinovic
    New Member
    • Oct 2007
    • 167

    #2
    Originally posted by jkozik
    I am trying to write a iif statement that returns "0" if the cell is blank, otherwise a "1". For some reason this filter returns only 1's regardless of whether the cell is field is blank or not.

    1Acct Processing: IIf([Unsecuritizable Assets Table]![account processing status]="",0,1)

    I know this is a basic problem, but I have been playing with it for a while and am a novice user of access. Thanks in advance.
    Try this:

    IIf(IsNull([Unsecuritizable Assets Table]![account processing status])=True,0,1)

    or

    IIf(Len([Unsecuritizable Assets Table]![account processing status])=0,0,1)


    best,
    h.

    Comment

    Working...