Results 1 to 4 of 4
  1. #1
    NGFLNG1 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2014
    Posts
    16

    Changing font color of just part of a label

    Hi everyone,

    Is it possible to use two color fonts on one label? I want to bring attention to the user that by clicking a certain button they can perform a search by "Name" and by clicking on the other button, they can perform a search by "Appointment".

    I have a switchboard type form with some buttons. The two buttons in question are labeled, "Search for Appts by Name" and "Search for Appts by Appointment". I want to keep the "Search for" section of the button in black font, but change the "by Appointment" and "by Name" to red font.

    Thank you.

    V/r,

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    no. 1 forecolor, 1 backcolor
    now you can 'cheat' by having 2 labels. on top of 1 another to look that way.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Instead of a label you can use a textbox control and set the control's Text Format property (under the Data tab) to Rich Text. With that you can place the appropriate font tags with your text. You may have to place the entire text within a div tag.
    http://www.w3schools.com/tags/tag_font.asp

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    It works without the <div> tag. In fact, using <div> tag forces a new line.

    However, can't do this with the button Caption property. And a textbox cannot be connected to a button.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 04-28-2015, 07:08 AM
  2. VBA to change font color
    By data808 in forum Access
    Replies: 5
    Last Post: 10-23-2014, 11:10 AM
  3. Replies: 8
    Last Post: 05-21-2014, 07:21 PM
  4. Changing Font Color and Size in table
    By FormerJarHead in forum Access
    Replies: 2
    Last Post: 01-09-2013, 01:04 PM
  5. Changing font color based on criteria
    By Pattie Weaver in forum Reports
    Replies: 5
    Last Post: 11-02-2010, 03:38 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