Results 1 to 3 of 3
  1. #1
    Eric2013 is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    14

    iff statement with a few conditions

    I've been messing with this for a while, tried to work it through, searched this forum and google and probably missed what i need.



    But, I need some help with an expression in Query if this is possible.

    I have a parts column with net price values in it that range from .50 cents to $1,000.00. Next to that I have a column that I would like to have list price values in it that are calculated from the net price values. But, need this column to adjust using profit margins. Eg: 0-10.00 add 40% margin, 10.01-20.00 add 30%, 20.01-30.00 add 20%
    «Expr» IIf( [Net $ <0, 10>, /0.6] , «truepart», «falsepart») [I know this expression is wrong]

    First question I have, is can this be done using an expression? If so, can someone help me with it?

    Or, do I need to build a subroutine and then an If and then statement to call them.
    If so, can someone help me with it?. I’m not a vba expert by any means, but, can follow step by step.

    Thanks in advance for any help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    MarginPct: Switch([Net]<10.01, 0.4, [Net]<20.01, 0.3, [Net]>=20, 0.2)
    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
    Eric2013 is offline Novice
    Windows 8 Access 2013
    Join Date
    Mar 2013
    Posts
    14
    thanks June 7 ! works great.

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

Similar Threads

  1. Replies: 5
    Last Post: 10-21-2013, 06:44 PM
  2. Replies: 1
    Last Post: 06-20-2012, 12:44 PM
  3. Replies: 5
    Last Post: 04-20-2012, 06:40 PM
  4. iif statement with multiple conditions
    By ragsgold in forum Queries
    Replies: 7
    Last Post: 08-24-2011, 05:38 PM
  5. Iff Statement Meeting 2 Conditions
    By newbie in forum Access
    Replies: 11
    Last Post: 06-11-2009, 11:59 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