Results 1 to 6 of 6
  1. #1
    dilbert is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Aug 2010
    Posts
    21

    IIF Formatting

    Can I use formatting inside of an IIF statement in a report?

    For instance:

    =IIf(xyz > 1000, "This is large", "This is small")

    Can I have the word This underlined and bold, and the word large in bold, or the word small in italics?



    Thank you

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Yes. The text format would have to be set to Rich Text and you'd use HTML inside the string.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    dilbert is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2010
    Posts
    21
    Thank you, by HTML, would I do bold like this
    Code:
    <B>  </B>
    ?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Yes, I tested:

    =IIf(1=1,"<b><u>this</u></b> is bold","not")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    dilbert is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2010
    Posts
    21
    Quote Originally Posted by pbaldy View Post
    Yes, I tested:

    =IIf(1=1,"<b><u>this</u></b> is bold","not")
    Thank you!!!

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 11-12-2015, 10:46 AM
  2. formatting
    By krishnanhemanth in forum Forms
    Replies: 5
    Last Post: 12-05-2013, 01:06 PM
  3. Even Odd row formatting
    By Perceptus in forum Reports
    Replies: 3
    Last Post: 12-06-2012, 01:50 PM
  4. Conditional Formatting vs. VBA Formatting
    By gopherking in forum Reports
    Replies: 5
    Last Post: 11-09-2011, 06:53 PM
  5. Between formatting
    By reidn in forum Queries
    Replies: 2
    Last Post: 07-21-2011, 12:11 PM

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