Results 1 to 5 of 5
  1. #1
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226

    Using if to find blank fields?


    I am trying to use an iff statment that looks for a blank field. and sets the field to "1"

    Find blanks1: IIf([Accredited,Guest,Visitor]=Null,1,0) does not work
    Find blanks2: IIf([Accredited,Guest,Visitor]="",1,0) does not work

    Any suggestions?

  2. #2
    ser01 is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    64
    Quote Originally Posted by newtoAccess View Post
    I am trying to use an iff statment that looks for a blank field. and sets the field to "1"

    Find blanks1: IIf([Accredited,Guest,Visitor]=Null,1,0) does not work
    Find blanks2: IIf([Accredited,Guest,Visitor]="",1,0) does not work

    Any suggestions?
    Try:
    Code:
     IIf([Accredited,Guest,Visitor] IsNull,1,0)

  3. #3
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226
    Blank_accredited: IIf([Query Make Full name]![Accredited,Guest,Visitor]=[isNull],1,0)

    Nope not finding the Null.
    It automaticly puts = []

  4. #4
    SteveH2508 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Location
    Chelsea, London, England
    Posts
    117
    IIf(IsNull([Accredited,Guest,Visitor]),1,0)

  5. #5
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226
    yap,,

    That works

    Thanks again

Please reply to this thread with any new information or opinions.

Similar Threads

  1. searching for blank fields with a query
    By ironman in forum Queries
    Replies: 0
    Last Post: 03-04-2011, 03:48 PM
  2. Replies: 2
    Last Post: 02-03-2011, 12:41 PM
  3. Look for blank date fields
    By NOTLguy in forum Programming
    Replies: 3
    Last Post: 10-17-2010, 07:56 AM
  4. Add fields and find percentage
    By gurp99 in forum Queries
    Replies: 1
    Last Post: 08-09-2010, 03:57 PM
  5. Replies: 3
    Last Post: 06-04-2010, 12:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums