Results 1 to 4 of 4
  1. #1
    Juan4412 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2010
    Posts
    209

    Set Label Text To Bold In VBA

    What is the syntax using VBA to set label text to bold?



    I tried to use the html tags
    Code:
    <strong></strong>
    <b></b>
    But that just writes the html on screen not change the font.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    In an event, you can add code such as

    Me.Label22.FontBold = True

    and substitute your label name for Label22

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    LabelName.Fontbold= true

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Try:
    Me.ControlName.FontWeight = 700
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. How to bold text within concatenate ?
    By adnancanada in forum Queries
    Replies: 12
    Last Post: 02-10-2016, 03:04 AM
  2. PDF output file does not show the text as bold
    By Donothing in forum Import/Export Data
    Replies: 2
    Last Post: 10-13-2013, 11:58 AM
  3. Some label fonts appear bold
    By kelann in forum Forms
    Replies: 2
    Last Post: 11-06-2012, 12:11 PM
  4. How to create a message box with bold text
    By uronmapu in forum Access
    Replies: 5
    Last Post: 07-12-2012, 03:09 AM
  5. How do I Bold the first Text in ListBox
    By uronmapu in forum Access
    Replies: 8
    Last Post: 06-17-2012, 09:32 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