D
Dan H.
I'm trying to change the backcolor of my control by keying in on select words
such as "Vacant", "Military", "Contractor", and "KTR". When one of these
words are type into the control the back color will change. Anything else
the field stays in its default color. I know that conditional formating is
available but I have more than the 3 allowed so this is the work around.
Private Sub DispatchName_AfterUpdate()
If [DispatchName] = "Vacant" Then [DispatchName].BackColor = vbGreen
ElseIf [DispatchName] = "KTR" Then [DispatchName].BackColor = vbYellow
ElseIf [DispatchName] = "Military" Then [DispatchName].BackColor = vbBlue
Else: [DispatchName].BackColor = vbWhite
End If
End Sub
Please help.
If there is an easier way other than condidtional format plese let me know.
I'm not a VB program by any means.
Thanks
such as "Vacant", "Military", "Contractor", and "KTR". When one of these
words are type into the control the back color will change. Anything else
the field stays in its default color. I know that conditional formating is
available but I have more than the 3 allowed so this is the work around.
Private Sub DispatchName_AfterUpdate()
If [DispatchName] = "Vacant" Then [DispatchName].BackColor = vbGreen
ElseIf [DispatchName] = "KTR" Then [DispatchName].BackColor = vbYellow
ElseIf [DispatchName] = "Military" Then [DispatchName].BackColor = vbBlue
Else: [DispatchName].BackColor = vbWhite
End If
End Sub
Please help.
If there is an easier way other than condidtional format plese let me know.
I'm not a VB program by any means.
Thanks