Changing text color of combo boxes using if...then

M

Michelle

I am creating a database that has a subform that lists training needs for
employees. If an employee meets certain criteria, I want the font for the
text boxes for this criteria to turn red. Right now my code looks like
this....

If Line = "JS" And Description = "Bonder" And Workstation = "Workstation #4"
Then
MsgBox "OPERATOR MUST MEET QUANDRANT 3 OR ABOVE STANDARDS TO OPERATE THIS
STATION. FOR THE PURPOSES OF TRAINING AN OPERATOR TO MEET THIS STANDARD, THE
TRAINEE MUST WORK WITH A QUALIFIED QUADRANT 3 OPERATOR OR SUPERVISOR FOR A
MININUM OF 30 MINUTES. AS WELL, THE SUPERVISOR MUST ACKNOWLEDGE THE ABILITY
OF THE TRAINEE TO MEET THE QUADRANT 3 QUALIFICATIONS"

ElseIf Line = "JS" And Description = "FLA" And Workstation = "Workstation
#9" Then MsgBox "OPERATOR MUST MEET QUANDRANT 3 OR ABOVE STANDARDS TO OPERATE
THIS STATION. FOR THE PURPOSES OF TRAINING AN OPERATOR TO MEET THIS
STANDARD, THE TRAINEE MUST WORK WITH A QUALIFIED QUADRANT 3 OPERATOR OR
SUPERVISOR FOR A MININUM OF 30 MINUTES. AS WELL, THE SUPERVISOR MUST
ACKNOWLEDGE THE ABILITY OF THE TRAINEE TO MEET THE QUADRANT 3 QUALIFICATIONS"

ElseIf Line = "968 Rear" And Description = "Welder" And Workstation =
"Workstation #3" Then
MsgBox "OPERATOR MUST MEET QUANDRANT 3 OR ABOVE STANDARDS TO OPERATE THIS
STATION. FOR THE PURPOSES OF TRAINING AN OPERATOR TO MEET THIS STANDARD, THE
TRAINEE MUST WORK WITH A QUALIFIED QUADRANT 3 OPERATOR OR SUPERVISOR FOR A
MININUM OF 30 MINUTES. AS WELL, THE SUPERVISOR MUST ACKNOWLEDGE THE ABILITY
OF THE TRAINEE TO MEET THE QUADRANT 3 QUALIFICATIONS"

ElseIf Line = "Mustang RCL" And Description = "Welder" And Workstation =
"Workstation #1" Then
MsgBox "OPERATOR MUST MEET QUANDRANT 3 OR ABOVE STANDARDS TO OPERATE THIS
STATION. FOR THE PURPOSES OF TRAINING AN OPERATOR TO MEET THIS STANDARD, THE
TRAINEE MUST WORK WITH A QUALIFIED QUADRANT 3 OPERATOR OR SUPERVISOR FOR A
MININUM OF 30 MINUTES. AS WELL, THE SUPERVISOR MUST ACKNOWLEDGE THE ABILITY
OF THE TRAINEE TO MEET THE QUADRANT 3 QUALIFICATIONS"

I have approximately 30 different criteria statements. I cannot use
conditional formatting because it changes all the records in my database to a
red front. I just want the record that contains each criteria to turn red.

Ex: One employee on the "JS" Line works on a "Bonder" on "Workstation #4",
when this is input I would like the text of "JS" "Bonder" and "Workstation
#4" to turn red for this employee but not for another employee if they do not
meet the criteria. Plus I have a message box that will open up with
information if the employee meets this criteria.

Any help would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top