G
Guest
I have a database that when given three specific criteria on a record, a
message box will appear giving further information. This works fine but I
would also like to change the font color for these three fields based on the
criteria being true. I have approximately 25 different criteria situations
that could appear.
Here is a sample of the code I am using...When I change the forecolor and
background it applies to all records in the database, it does not pick out
the record that has the criteria listed.
In the first paragraph when "JS" is the line and "Bonder" is the Description
and "Workstation #4" is the Workstation I want the message box to appear but
I also want the font color of "JS" "Bonder" and "Workstation #4" to change to
red. I do not want the other records to change colors. Can anyone help me?
(FYI - I have posted this message twice but didn't see it listed, so I hope
I'm not duplicating anything). Thanks in advance for your help.
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 Line.ForeColor = lngRed: Workstation.ForeColor = 255:
Description.ForeColor = 255
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"
message box will appear giving further information. This works fine but I
would also like to change the font color for these three fields based on the
criteria being true. I have approximately 25 different criteria situations
that could appear.
Here is a sample of the code I am using...When I change the forecolor and
background it applies to all records in the database, it does not pick out
the record that has the criteria listed.
In the first paragraph when "JS" is the line and "Bonder" is the Description
and "Workstation #4" is the Workstation I want the message box to appear but
I also want the font color of "JS" "Bonder" and "Workstation #4" to change to
red. I do not want the other records to change colors. Can anyone help me?
(FYI - I have posted this message twice but didn't see it listed, so I hope
I'm not duplicating anything). Thanks in advance for your help.
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 Line.ForeColor = lngRed: Workstation.ForeColor = 255:
Description.ForeColor = 255
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"