Results 1 to 3 of 3
  1. #1
    Bertrand82 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2012
    Posts
    48

    Iif function

    Hi gyys,



    I normally have success with iif functins but has met a strange behaviour.

    I have a lot of blank values in field2. Would like a new field with the blank values returned as zeros instead.

    I cant get this to work....

    Newfieldwithzeros: IIf([Field2]="";0;1)

    is this correct?

    br betrand

  2. #2
    qa12dx is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    india
    Posts
    112
    how i'd do it is, change the default value of the field to 0. then run a update query to make the nulls to zero.

    afterthat your queries should work fine

  3. #3
    Bertrand82 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2012
    Posts
    48
    It worked! thanks.

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

Similar Threads

  1. Between function
    By brownk in forum Queries
    Replies: 2
    Last Post: 09-10-2012, 08:33 AM
  2. HELP with IIF function
    By lpfluger in forum Queries
    Replies: 3
    Last Post: 04-01-2011, 12:01 AM
  3. First function
    By Yoohoo in forum Programming
    Replies: 10
    Last Post: 11-22-2010, 01:36 PM
  4. if function
    By lolo in forum Queries
    Replies: 1
    Last Post: 08-01-2010, 11:38 PM
  5. Want function to get current function name
    By Davis DeBard in forum Programming
    Replies: 2
    Last Post: 08-13-2009, 05:02 AM

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