M
martinmike2
I know that I am going to feel dumb when I get an answer to this
question, but I just can't come up woth the answer.
I am trying to compare a textbox 1's value to the value of two other
textbox's. If textbox 1's value is equal to either textbox 2 or 3,
then do nothing, but if textbox 1 is not equal to either textbox 2 or
3, then shade it red. So far I can get it to shade red is textbox 1
is not equal to textbox 2, but when I try to add in textbox3, i get
every textbox1 turning red.
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim lngRed As Long
lngRed = RGB(255, 0, 0)
If Not (Me.DNEC1 = Me.r_pnec) Or (Me.DNEC1 = Me.r_snec) Then
Me!DNEC1.BackColor = lngRed
End If
End Sub
question, but I just can't come up woth the answer.
I am trying to compare a textbox 1's value to the value of two other
textbox's. If textbox 1's value is equal to either textbox 2 or 3,
then do nothing, but if textbox 1 is not equal to either textbox 2 or
3, then shade it red. So far I can get it to shade red is textbox 1
is not equal to textbox 2, but when I try to add in textbox3, i get
every textbox1 turning red.
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim lngRed As Long
lngRed = RGB(255, 0, 0)
If Not (Me.DNEC1 = Me.r_pnec) Or (Me.DNEC1 = Me.r_snec) Then
Me!DNEC1.BackColor = lngRed
End If
End Sub