Advertisement

05.08.2008 at 06:54AM PDT, ID: 23386029
[x]
Attachment Details

Set textbox / combobox conditional font color using vba

Asked by keithedwardb in Microsoft Access Database, Access Coding/Macros

Tags: microsoft, office, 2003

Hi Experts,
I have a form where the user selects from a combo box 1 of 3 values; H, M, or L.  If the user slects 'H', I want to set the font color or another textbox (yet to be filled in) with 1 of 3 colours. Red, Amber or green.
Shown below is a sample of my select case.  the code runs and yet when I get to the me.txtActionID field, the colour remains the same - i.e. black.  

Private Sub cboRiskCatBefore_AfterUpdate()
Select Case cboRiskCatBefore
        Case "H"
            intRiskMax = 20
            intRiskMin = 9
            Me.txtActionID.FontBold = True
            Me.txtActionID.ForeColor = vbRed
        Case "M"......
.....

Can anyone tell me what I am doing wrong, please?
Thanks.
Regards,
KeithStart Free Trial
 
Loading Advertisement...
 
[+][-]05.08.2008 at 07:08AM PDT, ID: 21524808

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.08.2008 at 07:22AM PDT, ID: 21524966

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 03:18PM PDT, ID: 21569200

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, Access Coding/Macros
Tags: microsoft, office, 2003
Sign Up Now!
Solution Provided By: boag2000
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.15.2008 at 12:15AM PDT, ID: 21571213

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 08:05AM PDT, ID: 21574423

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 08:10AM PDT, ID: 21574484

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628