S
SuzyQ
I have this code in a before update event - I don't care whether the user
changes the data or not, I just want to warn the user that the data has been
changed. This code is preventing the user from leaving the field regardless.
Even if I comment out all of the code but leave the procedure - just having
a BeforeUpdate procedure, even an empty one prevents the user from moving on
from the field.
Private Sub Quantity_BeforeUpdate(Cancel As Integer)
If Me.InvenotryItemAdded = True Then
'inventory item already added -
'warn user quantity has changed - user will need to update inventory
manually
If Me.Quantity.Value <> Me.Quantity.OldValue Then
MsgBox Me.Quantity.OldValue & " has already been addded to
inventoy" & vbCrLf & _
"Update inventory manually through inventory form"
End If
End If
Cancel = 0 'accept data entered
End Sub
changes the data or not, I just want to warn the user that the data has been
changed. This code is preventing the user from leaving the field regardless.
Even if I comment out all of the code but leave the procedure - just having
a BeforeUpdate procedure, even an empty one prevents the user from moving on
from the field.
Private Sub Quantity_BeforeUpdate(Cancel As Integer)
If Me.InvenotryItemAdded = True Then
'inventory item already added -
'warn user quantity has changed - user will need to update inventory
manually
If Me.Quantity.Value <> Me.Quantity.OldValue Then
MsgBox Me.Quantity.OldValue & " has already been addded to
inventoy" & vbCrLf & _
"Update inventory manually through inventory form"
End If
End If
Cancel = 0 'accept data entered
End Sub