In a Customer form there's a field for Account Manager.
For any customer record, if an Account Manager has already been assigned I want to warn if someone tries to assign a different Account Manager.
But if the Account Manager field was empty, for example when creating a new customer record, I don't want the warning to appear.
This satisfies the first requirement but incorrectly gives a warning for a new record. So I'm looking for a way of saying if the field starts off empty then go ahead, otherwise warn.
For any customer record, if an Account Manager has already been assigned I want to warn if someone tries to assign a different Account Manager.
But if the Account Manager field was empty, for example when creating a new customer record, I don't want the warning to appear.
This satisfies the first requirement but incorrectly gives a warning for a new record. So I'm looking for a way of saying if the field starts off empty then go ahead, otherwise warn.
Code:
If Me.AccountManager > 0 Then
If MsgBox("Sure you want to change the Account Manager?", vbOKCancel + vbExclamation) = vbCancel Then
Me.Undo
End If
End If