Results 1 to 2 of 2
  1. #1
    frustratedwithaccess is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Oct 2014
    Posts
    35

    iif, then statements

    Hi All,



    Hoping someone can answer a question I have re iif/then statements in a query...

    Basically, I have 4 fields

    A, B, C, and D

    I am attempting to build an expression/calculation in Field "D". Field D equals [C]-[B]. However, not all records have values in fields B and C, which leaves those records blank in field D....So wherever there is a blank record in D, I want the corresponding record from field A (where there are no blank records) to be used.

    Hope someone can help
    Thanks!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Try

    Nz([C]-[B], [A])
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Using If statements
    By Joyce Carney in forum Queries
    Replies: 2
    Last Post: 07-06-2014, 05:27 PM
  2. If statements
    By swagger18 in forum Programming
    Replies: 6
    Last Post: 01-28-2011, 08:13 PM
  3. IIF statements?
    By staceyo in forum Queries
    Replies: 15
    Last Post: 09-28-2010, 08:45 AM
  4. SQL statements from VBA
    By John Southern in forum Programming
    Replies: 12
    Last Post: 05-16-2010, 01:07 PM
  5. If statements
    By Ezeecopy in forum Access
    Replies: 0
    Last Post: 03-24-2009, 04:54 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