Results 1 to 5 of 5
  1. #1
    tim.cassey is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    25

    IIf Expression, or use something else?

    I am currently using an IIf expression within a report to either display one symbol (an empty checkbox), or to display another symbol (a ticked checkbox), depending on if a particular field in a table is checked or not (yes or no box).

    What I need to do, is have a third argument... where if an item does not have the box checked, and also is of a particular model, the symbol that should display is a filled in check-box (indicating that it doesn't apply to this).



    If this doesn't make sense let me know and I'll post some dummy data, I just didn't know if expressions could do this within a report.

    Thanks for any help.

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    investigate using nested iifs or the choose function (which is a bit like a case function)

    iif(a=b,1,iif(a=c,2,3))

    or

    choose(a=b,1,a=c,2,true,3)

    or a combination

    choose(a=b,1,iif(a=c,1,2))

  3. #3
    tim.cassey is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    25
    I'll give it a try and let you know how I go. Thanks very much!

  4. #4
    tim.cassey is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    25
    I'm getting a bit confused when trying to put it all together, and I think it's a bit more complex than I thought.

    I have 5 models I want to check against: 1,2,3,4,5

    Basically what I want to achieve is:

    IF Checkbox = Yes, Then display "TICK", Else Display "UNCHECKED BOX"

    Although IF Model=1,2,3,4,5 THEN display "FILLED IN BOX"


    Not sure what to use in expressions

  5. #5
    tim.cassey is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    25
    Ended up using nested IIf statements. Attempted to use the SWITCH statement but it wasn't working for me... a bit messy but it got the job done.

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

Similar Threads

  1. Replies: 5
    Last Post: 09-25-2013, 09:35 AM
  2. Replies: 2
    Last Post: 11-20-2012, 03:21 AM
  3. Replies: 4
    Last Post: 10-26-2012, 12:49 AM
  4. Expression Help
    By bboyd in forum Access
    Replies: 3
    Last Post: 11-25-2011, 06:11 AM
  5. Looking for help with an expression
    By CoachBarker in forum Queries
    Replies: 3
    Last Post: 11-25-2010, 05:17 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