Results 1 to 2 of 2
  1. #1
    pbparady is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2012
    Posts
    1

    Conditional Formatting of a label

    In an Access 2010 form, I want to trigger a change of the text color of a label, when it's corresponding checkbox is selected (Simply checking the box is not enough for these users)



    I've found a reference to doing this by changing the label to a text box, and setting it's control source to to a text string. I've tried setting the control source ="Label Text" but this is not working. Any help is greatly appreciated.

  2. #2
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    No need to change it to a textbox.

    in the click event of the checkbox use the following

    If check1 then label1.forecolor = vbRed Else label1.forecolor = vbblack

    Where check1 is the name of your checkbox
    label1 is the name of the associated label

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

Similar Threads

  1. Conditional Formatting
    By ccordner in forum Reports
    Replies: 6
    Last Post: 01-09-2012, 04:12 PM
  2. Conditional Formatting
    By Desstro in forum Programming
    Replies: 3
    Last Post: 12-01-2010, 09:52 PM
  3. conditional formatting right(..)
    By bbeernaert in forum Access
    Replies: 3
    Last Post: 08-25-2010, 12:33 AM
  4. Formatting a label
    By swicklund in forum Reports
    Replies: 4
    Last Post: 08-24-2010, 03:27 PM
  5. Conditional Formatting
    By cevatyildiz in forum Forms
    Replies: 8
    Last Post: 04-30-2010, 12:01 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