H
Hungry
Hi.
I am receiving the error in the Subject box. Below is my code:
Private Sub Salary_BeforeUpdate(Cancel As Integer)
'Verify the Bonus Quota field value is 40 and if so Salary must be less
than or equal to 30,000
If BonusQuota = 40 Then
If Salary > 30000 Then
DoCmd.CancelEvent
MsgBox "If Bonus Quota is 40, Salary must be LE 30,000"
Me.Undo
Salary.SetFocus
End If
End If
End Sub
The error message reads: You must save the field B4 you execute the
GoToControl action, the GoToControl method, or the SetFocus method.
What is wrong?
Thank You
I am receiving the error in the Subject box. Below is my code:
Private Sub Salary_BeforeUpdate(Cancel As Integer)
'Verify the Bonus Quota field value is 40 and if so Salary must be less
than or equal to 30,000
If BonusQuota = 40 Then
If Salary > 30000 Then
DoCmd.CancelEvent
MsgBox "If Bonus Quota is 40, Salary must be LE 30,000"
Me.Undo
Salary.SetFocus
End If
End If
End Sub
The error message reads: You must save the field B4 you execute the
GoToControl action, the GoToControl method, or the SetFocus method.
What is wrong?
Thank You