Results 1 to 5 of 5
  1. #1
    stuart is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Posts
    3

    Post multiple criteria

    Hey I'm new to expressions and I need to make a discount with multiple outcomes dependent on which company is being used. I can get the expression builder to easily do it for one but I'm having trouble getting another set of criteria to work in the expression builder any thoughts?

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    would need more information to provide any suggestions - provide some example data and the required outcome from that data so we can see what the expression is required to do.

  3. #3
    stuart is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Posts
    3
    Ok so we have companies that give us different discounts e.g. chandlers, 15 percent otherwise write none. I now need to add another company with a different discount and would like to add it to this expression. At the moment my expression is the one below:

    IIf([Supplier]="Chandlers","15","none")

    Any thoughts greatly appreciated

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    suggest use the switch function

    Switch([Supplier]="Chandlers","15","[Supplier]="Apple","5",true,"none")

    however these discounts should be stored in a table. Your way is hard coded, so you need to modify your query for each time you add another supplier with discounts. If a supplier does not have a discount, you can use the format property to display "none". And "15" is text so cannot be used in a calculation.

  5. #5
    stuart is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Posts
    3
    Thanks,

    Will try this to see if I can get this to work!

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

Similar Threads

  1. Replies: 3
    Last Post: 07-27-2016, 03:02 AM
  2. Replies: 2
    Last Post: 04-02-2015, 12:45 PM
  3. Replies: 5
    Last Post: 03-22-2015, 08:43 PM
  4. Replies: 7
    Last Post: 01-02-2013, 11:23 PM
  5. Replies: 1
    Last Post: 07-13-2011, 11:00 AM

Tags for this Thread

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