I have a form in which I have a procedure which changes the ForeColor to a different color when a condition is meet. This is part of the code:
If Me![WorkDay1Reason] = "" Then
Me![WorkDay1Reason].ForeColor = vbBlack
Me![WorkDay1].ForeColor = vbBlack
End If
If Me![WorkDay1Reason] = "Bonus" Then
Me![WorkDay1Reason].ForeColor = vbBlue
Me![WorkDay1].ForeColor = vbBlue
End If
The trouble is that the fields change for all of the employees, so I need to know how to reset ForeColor back to its' default when the EmployeeNumber changess. In other words, for this record only.
Also the code pertaining to the "" does not work, if I leave the combo box blank nothing changes, but if I change it to Bonus it changes th ForeColor to blue like it should. I have tried using = Null and IsNull, but it never changes ForeColor to Black like it should. Thank you in advance to anyone helping to corect these two problems.
If Me![WorkDay1Reason] = "" Then
Me![WorkDay1Reason].ForeColor = vbBlack
Me![WorkDay1].ForeColor = vbBlack
End If
If Me![WorkDay1Reason] = "Bonus" Then
Me![WorkDay1Reason].ForeColor = vbBlue
Me![WorkDay1].ForeColor = vbBlue
End If
The trouble is that the fields change for all of the employees, so I need to know how to reset ForeColor back to its' default when the EmployeeNumber changess. In other words, for this record only.
Also the code pertaining to the "" does not work, if I leave the combo box blank nothing changes, but if I change it to Bonus it changes th ForeColor to blue like it should. I have tried using = Null and IsNull, but it never changes ForeColor to Black like it should. Thank you in advance to anyone helping to corect these two problems.