Results 1 to 5 of 5
  1. #1
    Brien is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Location
    Queen Creek Arizona
    Posts
    3

    Using the iif statement

    Working on a query were I have to show that if the monthly fee is greater than $35 to multiply that by 15% to make it a discounted enrollment fee, and if it is less than $35 to show no change but I am having issues. My syntax is ReEnrollmentfee:IIF([Monthlyfee]=">35", *0.15, 0) what is wrong with this syntax?

  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,530
    Try

    IIF([Monthlyfee]>35, 0.15, 0)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    Assuming that you want to discount the re-enrollment fee by 15% if the monthly fee is over $35, try this:

    ReEnrollmentfee:IIF([Monthlyfee]>35, [Monthlyfee]*0.85, [Monthlyfee])

    John

  4. #4
    Brien is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Location
    Queen Creek Arizona
    Posts
    3
    Thank you John, it worked perfectly.

    Quote Originally Posted by John_G View Post
    Hi -

    Assuming that you want to discount the re-enrollment fee by 15% if the monthly fee is over $35, try this:

    ReEnrollmentfee:IIF([Monthlyfee]>35, [Monthlyfee]*0.85, [Monthlyfee])

    John

  5. #5
    Brien is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Location
    Queen Creek Arizona
    Posts
    3
    Thank you all for your help I learned something new today and it is a blessing thanks again

    Brien

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

Similar Threads

  1. if statement in sql statement, query builder
    By 54.69.6d.20 in forum Access
    Replies: 4
    Last Post: 09-11-2012, 07:38 AM
  2. SQL statement
    By JohnPapa in forum Programming
    Replies: 1
    Last Post: 09-19-2011, 10:42 AM
  3. Replies: 7
    Last Post: 08-17-2011, 01:49 PM
  4. if statement
    By sirlosi in forum Queries
    Replies: 4
    Last Post: 03-07-2011, 11:26 AM
  5. Need Help with SQL Statement
    By Hank44 in forum Programming
    Replies: 3
    Last Post: 11-08-2010, 05:49 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