Results 1 to 2 of 2
  1. #1
    erringtonl is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2012
    Posts
    1

    Iif and calculated queries problem

    Hi,



    Have a field called commision rate which is a combo box with three choices; Full Commision, EBay Commision and No Commision.

    However, I also have a field called Commision which I would like to calculate dependant on what is chosen for Commision rate.

    For example;

    If Commision rate=Full Commision then Commision=[Price]*0.05
    If Commision rate=EBay Commision then Commision=[Profit]*0.05
    If Commision rate=No Commision then Commision=0

    I have tried everything and cannot seem to understand where i'm going wrong. Would appreciate some guidance on the issue.

    Thanks in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Use IIf or Switch function

    IIf([Commission rate]="Full Commission",[Price] * 0.05, IIf([Commission rate]="EBay Commission",[Profit] * 0.05, 0))

    or

    0.05 * IIf([Commission rate]="Full Commission",[Price], IIf([Commission rate]="EBay Commission",[Profit], 0))
    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.

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

Similar Threads

  1. Wrong calculated VAT????
    By albertc30 in forum Forms
    Replies: 12
    Last Post: 09-12-2011, 09:21 AM
  2. Problem with Access Queries\Reports
    By Crysis3nt in forum Access
    Replies: 1
    Last Post: 09-09-2010, 02:26 AM
  3. Replies: 1
    Last Post: 05-05-2010, 01:54 AM
  4. Another problem with queries
    By Viggen66 in forum Queries
    Replies: 3
    Last Post: 02-23-2010, 05:01 PM
  5. Queries to Form Problem
    By PnerraD in forum Queries
    Replies: 1
    Last Post: 06-10-2006, 09:13 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