K
Kathy
I am a new comer...I am building a form with a subform. In the subform, when
a conditional event occurs, like the number entered is more than 12, the
number turns red and a msgBox pops up with a warning. Here is the code:
Private Sub strHGB_BeforeUpdate(Cancel As Integer)
With Me!strHGB
If (.Value >= 12) Then
Me!strHGB.ForeColor = 255
MsgBox "Review DOQI Guidelines for HGB >= 12."
Else
Me!strHGB.ForeColor = 0
End If
End With
End Sub--
My problem is that the forecolor change does not occur in the subform
(datasheet view). It will turn red in form view or continuous view, but only
the msgBox comes up in datasheet. Is there any way to fix this? Thank you.
Kbelo
a conditional event occurs, like the number entered is more than 12, the
number turns red and a msgBox pops up with a warning. Here is the code:
Private Sub strHGB_BeforeUpdate(Cancel As Integer)
With Me!strHGB
If (.Value >= 12) Then
Me!strHGB.ForeColor = 255
MsgBox "Review DOQI Guidelines for HGB >= 12."
Else
Me!strHGB.ForeColor = 0
End If
End With
End Sub--
My problem is that the forecolor change does not occur in the subform
(datasheet view). It will turn red in form view or continuous view, but only
the msgBox comes up in datasheet. Is there any way to fix this? Thank you.
Kbelo