Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2015
    Posts
    7

    IIf - if value in field A is zero use column B content, otherwise content of field A

    Being new to Access I need to do the IIF calculation as per the title, if value in field A is zero use column B content, otherwise content of A. I haven't had any success, can anyone give me the syntax? At the moment I'm exporting to Excel and importing the result.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Why haven't you had success, what have you tried?

    IIf([A]=0, [B], [A])
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Jan 2015
    Posts
    7
    Many thanks for that and it works ok. I tried many things but couldn't get it to work and couldn't see a sample in any of the googled links. Looks easy now you show it in a simple form.

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

Similar Threads

  1. Replies: 5
    Last Post: 04-23-2013, 01:42 PM
  2. How to show field content in a Label?
    By robertdbuckley in forum Access
    Replies: 3
    Last Post: 05-24-2012, 04:02 AM
  3. Show all content in one field
    By Tecch82 in forum Database Design
    Replies: 4
    Last Post: 04-06-2012, 12:05 PM
  4. Hide the content of a field
    By peter_lawton in forum Queries
    Replies: 6
    Last Post: 01-17-2012, 11:24 AM
  5. update field with specific content
    By luxeon in forum Queries
    Replies: 2
    Last Post: 01-24-2011, 03:29 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