Results 1 to 2 of 2
  1. #1
    evanhughes is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    1

    Iif Statement in query


    Hi All

    I have a query to which I need to add a charge.
    The query is based on table1 but the charge is only added if a yes/no field in table2 is true.

    This is what I have tried but it does not work.

    Charge: IIf([Table2]![Field1]=True,Format("25","Currency"),Format("0","Currency "))

    Any ideas on what I am doing wrong.

    I tried adding table2 to the query and it just upset everything.

    Evan

  2. #2
    RedWolf3x is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jul 2011
    Posts
    31
    This may be an easy fix,

    If the [Table2]![Field1]=True is a boolean value, change true to -1

    Hope this helps.

    -Red

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

Similar Threads

  1. Query (if Statement I Think?)
    By Hello World in forum Queries
    Replies: 3
    Last Post: 10-13-2011, 09:25 AM
  2. query iif statement help
    By swat in forum Queries
    Replies: 4
    Last Post: 09-30-2011, 11:48 AM
  3. Query/IiF statement
    By peacepower in forum Queries
    Replies: 1
    Last Post: 08-23-2011, 04:05 PM
  4. Help fix SQL Statement for query
    By Budro49 in forum Queries
    Replies: 12
    Last Post: 06-21-2011, 02:26 PM
  5. If then statement in query
    By ronnie4 in forum Queries
    Replies: 1
    Last Post: 01-20-2009, 10:49 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