Results 1 to 4 of 4
  1. #1
    michaeljohnh is offline More Human than Human
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    61

    Using an event to change color of text.

    Im looking to give the users of a form some visual cues indicating in what order combo boxes need to be clicked. Even though the order is a straight forward top to bottom sequence, I believe in going the extra mile.



    So say the object is a label and is named lblCategory. Is there a VB command that will change the label's text color? Then Its just a matter of me putting that command into the proper event in the corresponding combo boxes, which I can handle.

    Thanks in advance.

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    check this link out.

    http://www.access-programmers.co.uk/...ad.php?t=34499

    i believe you would use Control.Label instead of just control and you would set it in the afterUpdate property of the combobox prior to the one you want to change the color of. Meaning, the code to change the color of combo2 is in the afterUpdate of Combo1.

    Hope this helps.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    FWIW, the label for each control has its own name usually starting with lbl. I believe if the label is attached to a control. it can also be referenced through that controls' collection.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by michaeljohnh View Post
    Im looking to give the users of a form some visual cues indicating in what order combo boxes need to be clicked. Even though the order is a straight forward top to bottom sequence, I believe in going the extra mile.

    So say the object is a label and is named lblCategory. Is there a VB command that will change the label's text color? Then Its just a matter of me putting that command into the proper event in the corresponding combo boxes, which I can handle.

    Thanks in advance.
    If you're looking to be in good graces with management, you might want to consider some good explanation to the users during a meeting instead of complex automation. The people I've worked with have always appreciated good explanation of "why's" a lot more than automation as a substitute for their ignorance. People seem to love to learn technology (if it's not too complicated). And of course, Access is on the low end of complication if you compare it to others out there.

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

Similar Threads

  1. Change font color in Query
    By Brian62 in forum Queries
    Replies: 2
    Last Post: 01-10-2013, 09:14 PM
  2. Replies: 3
    Last Post: 07-05-2010, 10:46 PM
  3. Change the text box color on form load
    By mikec in forum Programming
    Replies: 2
    Last Post: 03-01-2010, 11:47 PM
  4. Replies: 1
    Last Post: 03-29-2009, 08:27 AM
  5. change cell color
    By bishop743 in forum Programming
    Replies: 0
    Last Post: 02-01-2009, 11:00 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