R
Randy
I have 4 textboxes on a form as follows. [Edible], [Inedible] and [Foreign]
must equal [Sample]
[Sample]
[Edible]
[Inedible]
[Foreign] with the Control Source of =[Sample]-([Edible]+[Inedible])
The problem is if incorrect data (Too Much) is entered in [Edible] and
[Inedible] the outcome could be a negative number in [Foreign]. I tried
some code as follows, but it didn't work. Any Ideas..Thanks...Randy
If Me.Foreign < 0 Then
If MsgBox("Incorrect data Entered in Edible and/or Inedible. Please
Correct", vbYesNo + vbDefaultButton2) <> vbYes Then
Cancel = True
End If
End If
must equal [Sample]
[Sample]
[Edible]
[Inedible]
[Foreign] with the Control Source of =[Sample]-([Edible]+[Inedible])
The problem is if incorrect data (Too Much) is entered in [Edible] and
[Inedible] the outcome could be a negative number in [Foreign]. I tried
some code as follows, but it didn't work. Any Ideas..Thanks...Randy
If Me.Foreign < 0 Then
If MsgBox("Incorrect data Entered in Edible and/or Inedible. Please
Correct", vbYesNo + vbDefaultButton2) <> vbYes Then
Cancel = True
End If
End If