Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Replace zero with Null (2003)

    In a query, I have a field called FA Members. Whenever there is a zero, I would like it to be Null. How would I define a new column, so that I have that field with the 0's defined as null. FAMem2: IIF([FAMembers] = 0,?,[FAMembers]). I wasn't sure how to define null and of course my syntax is probably wrong.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Replace zero with Null (2003)

    You should be able to use Null:

    <code>FAMem2: IIf([FAMembers]=0,Null,[FAMembers])</code>

  3. #3
    3 Star Lounger
    Join Date
    Mar 2006
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    289
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Replace zero with Null (2003)

    Why not use an update query with the update to as Null, no quotes, and the criteria as 0.
    Thanks
    chuck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •