A
Amour
Hi I am really new to Access. I would like to check if a field has a order
number entered. Right now I have:
Private Sub Order_Num_AfterUpdate()
If Len(Me.[Order_Num] & "") = 0 Then
MsgBox "Please Enter a Order Number"
Me.[Order_Num].SetFocus
Cancel = True
End If
End Sub
Private Sub Order_Num_BeforeUpdate(Cancel As Integer)
If Len(Me.[Order_Num] & "") = 0 Then
MsgBox "Please Enter a Order Number"
Me.[Order_Num].SetFocus
Cancel = True
End If
End Sub
Both in the Before and After Updates withing the field. I tried putting the
expressions in the Unload section of the form and this worked but not the way
I wanted. The field is a key (dups ok), required = yes. So this message is
for information only and I want the form to stay up with all the fields that
have already been entered.
Please Help and Thank You!
number entered. Right now I have:
Private Sub Order_Num_AfterUpdate()
If Len(Me.[Order_Num] & "") = 0 Then
MsgBox "Please Enter a Order Number"
Me.[Order_Num].SetFocus
Cancel = True
End If
End Sub
Private Sub Order_Num_BeforeUpdate(Cancel As Integer)
If Len(Me.[Order_Num] & "") = 0 Then
MsgBox "Please Enter a Order Number"
Me.[Order_Num].SetFocus
Cancel = True
End If
End Sub
Both in the Before and After Updates withing the field. I tried putting the
expressions in the Unload section of the form and this worked but not the way
I wanted. The field is a key (dups ok), required = yes. So this message is
for information only and I want the form to stay up with all the fields that
have already been entered.
Please Help and Thank You!