Results 1 to 4 of 4
  1. #1
    ne1gold is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    6

    Expression builder - Multiple IF statements

    so im using the expression builder to try calculate values. But output stays blank :
    This is the expression :



    =IIf([Job Level FW]>=13,[Sum of core 13-16 FW]/5,0) Or ([Job Level FW] Between 9 And 12,[Sum of 9-12 FW]/15,0) Or ([Job Level FW] Between 7 And 8,[Sum of 7-8 FW]/10,0) Or ([Job Level FW]<=6,[Sum of 1-6 FW]/13,0)

    also tried this :

    IIf ([Job Level FW] >= 13,[Sum of core 13-16 FW]/5,0)
    elseIf ([Job Level FW] between 9 and 12,[Sum of 9-12 FW]/15,0)
    elseIf ([Job Level FW] between 7 and 8,[Sum of 7-8 FW]/10,0)
    elseIf ([Job Level FW] <= 6,[Sum of 1-6 FW]/13,0)




    Any help would be appreciated


  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    you need a nested iif and simplify the code

    =IIf([Job Level FW]>=13,[Sum of core 13-16 FW]/5, iif([Job Level FW] >8,[Sum of 9-12 FW]/15, iif([Job Level FW] >6,[Sum of 7-8 FW]/10, [Sum of 1-6 FW]/13)))

    you don't need the between - if [Job Level FW] equals say 7 the first 2 'iifs' are not met, but are met for the third iif

    Strongly recommend loose the spaces or use underscores for field names - use the caption property if you want spa

    Also your last iif (<=6) is not required as a test, if it fails all the previous ones, it is the only option - you will never get an option for the 0

  3. #3
    ne1gold is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2017
    Posts
    6

    Talking Thanks

    You saved my life!!! Thanks

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by ne1gold View Post
    You saved my life!!!
    Wow!! I think I'd be afraid to work for your bosses!!

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

Similar Threads

  1. Expression Builder?
    By ddeaton66 in forum Queries
    Replies: 1
    Last Post: 09-16-2016, 08:37 AM
  2. Replies: 4
    Last Post: 05-03-2016, 01:51 PM
  3. expression builder
    By kashrus in forum Access
    Replies: 3
    Last Post: 03-23-2015, 12:44 PM
  4. Replies: 7
    Last Post: 06-28-2013, 12:15 PM
  5. Replies: 2
    Last Post: 11-20-2012, 03:21 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