R
Randy
I have a form which includes the following 4 fields all numbers: [Sample],
[Edible], [Ined], and [FM] I have code in before update to prevent a
negative number from occuring in [FM]. [Edible], [Ined] and [FM] must
equall [Sample]. Example: Sample=3000.2, Edible=2987.3, Ined=12.9, FM=0.
This example equals exactly 3000.2 but my message box is popping up. If
the [Sample] data entry is exactly 3000 or any other number without tenths,
everything works fine. Any ideas what is happening? Thanks...Randy
Private Sub InedibleKernelslbl_BeforeUpdate(Cancel As Integer)
If [FM] < 0 Then
If MsgBox("Edible Kernels and/or Inedible Kernels Exceed The Sample
Size. Foreign Material Has a Negative Number. Please Correct Edible or
Inedible Kernels.", vbYes + vbDefaultButton2) <> vbYes Then
'Cancel = True
End If
End If
End Sub
[Edible], [Ined], and [FM] I have code in before update to prevent a
negative number from occuring in [FM]. [Edible], [Ined] and [FM] must
equall [Sample]. Example: Sample=3000.2, Edible=2987.3, Ined=12.9, FM=0.
This example equals exactly 3000.2 but my message box is popping up. If
the [Sample] data entry is exactly 3000 or any other number without tenths,
everything works fine. Any ideas what is happening? Thanks...Randy
Private Sub InedibleKernelslbl_BeforeUpdate(Cancel As Integer)
If [FM] < 0 Then
If MsgBox("Edible Kernels and/or Inedible Kernels Exceed The Sample
Size. Foreign Material Has a Negative Number. Please Correct Edible or
Inedible Kernels.", vbYes + vbDefaultButton2) <> vbYes Then
'Cancel = True
End If
End If
End Sub