Results 1 to 4 of 4

Thread: iif (access 97)

  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    iif (access 97)

    Hi, i have a linked table with many Yes/No fields in it that i want to show on a report. In the report they are, by default, shown as -1 or 0. How can i use the iif function to format them to Yes or No ?
    I have tried =IIF([field_name]=-1,"Yes","No") but this produces #Error on the report. <img src=/S/blackhole.gif border=0 alt=blackhole width=15 height=15>

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: iif (access 97)

    You're on the right track...Create a TextBox control and set its control source to your IIF function. Check boxes will not display text.

    HTH <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: iif (access 97)

    >>, i have a linked table with many Yes/No fields in it that i want to show on a report. In the report they are, by default, shown as -1 or 0. How can i use the iif function to format them to Yes or No ?
    I have tried =IIF([field_name]=-1,"Yes","No") but this produces #Error on the report<<

    The simplest solution is to create a textbox control for each of these fields, and for the Format property use this: ;"Yes";"No"

    Be sure that you have that leading semi-colon.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: iif (access 97)

    The objects were by default, text boxes so i just had to set the format.
    Absolute Genius.
    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •