I already know how to get text to change based on a value in a field but when I do it, it is doing it to the entire form. For example: When a certain number of days have passed, the formula I have will change the field to Green but when I click on that record it makes that field in all records change color. I want to be able to see all records (in a form by the way) change the proper color based on time passed for that specific record. In other words, each with their respective colors and not the whole from being the same color. I believe it has something to do with the title "Form_Current" but I cannot get it to specify a single record.
Here is what I am using right now:
Private Sub Form_Current()
' If value in LR text box is >6, display
' value in LR in red.
If (DateDiff("d", Me!LR.Value, Now()) < 7) Then
Me!LR.ForeColor = 32768 'Green
ElseIf (DateDiff("d", Me!LR.Value, Now()) > 6) Then
Me!LR.ForeColor = 32768 '255 'Red
ElseIf (DateDiff("d", Me!LR.Value, Now()) = 7) Then
Me!LR.ForeColor = 16711680 'Blue
End If
End Sub
I have searche all over these forums and found nothing specific to this. Any help would be greatly appreciated. Thank you.
Here is what I am using right now:
Private Sub Form_Current()
' If value in LR text box is >6, display
' value in LR in red.
If (DateDiff("d", Me!LR.Value, Now()) < 7) Then
Me!LR.ForeColor = 32768 'Green
ElseIf (DateDiff("d", Me!LR.Value, Now()) > 6) Then
Me!LR.ForeColor = 32768 '255 'Red
ElseIf (DateDiff("d", Me!LR.Value, Now()) = 7) Then
Me!LR.ForeColor = 16711680 'Blue
End If
End Sub
I have searche all over these forums and found nothing specific to this. Any help would be greatly appreciated. Thank you.