I am trying to set up some mandatory fields for my form. I have placed the following code in the beforeupdate event
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Delivery_Cost > 0 Then
GoTo end1:
Else:
MsgBox ("Please enter a delivery cost")
Cancel = True
end1:
End If
End Sub
this is working, checks if the delivery_cost field has a value and gives the user a message if it doesn't. After the message though it then gives the user a standard "Microsoft Access cannot save this record at this time" message. Is there anyway i can disable this.
Ideally i would like users to be prompted is they dont enter a value and the delivery_cost field to retain its focus.
Any help appreciated, sorry for waffling
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Delivery_Cost > 0 Then
GoTo end1:
Else:
MsgBox ("Please enter a delivery cost")
Cancel = True
end1:
End If
End Sub
this is working, checks if the delivery_cost field has a value and gives the user a message if it doesn't. After the message though it then gives the user a standard "Microsoft Access cannot save this record at this time" message. Is there anyway i can disable this.
Ideally i would like users to be prompted is they dont enter a value and the delivery_cost field to retain its focus.
Any help appreciated, sorry for waffling