Your code does not trap zero. Try the following, assuming
JobEstimatedProductSale is numeric.
If Nz(JobEstimatedProductSale, 0) = 0 Then
"Arno R" <ar***********@tiscali.nlwrote in message
news:45**********************@text.nova.planet.nl. ..
I did answer the 'almost' same question yesterday ...
But you had code like If IsNull(Me.ForecastProductSale) Then
You need "Cancel=True' instead of "Exit sub"
Arno
<er************@gmail.comschreef in bericht
news:11**********************@i39g2000hsf.googlegr oups.com...
Hi, I'm trying to write code that will not allow users to continue
unless a Product Sale is entered. This is what I have so far:
Private Sub ForecastProductSale_BeforeUpdate(Cancel As Integer)
If Nz(JobEstimatedProductSale, "") = "" Then
MsgBox "Warning: A Product Sale must be entered.", vbOKOnly,
"Warning"
Exit Sub
End If
End Sub
Can someone please tell me what I'm doing wrong?
Thanks.