The code you provided works, but I need help with one more thing. To ensure the value entered into .Basic_Amount & .Debit is always a negative number, I have this code in the afterupdate():
Code:
Private Sub Basic_Amount_AfterUpdate()Me.Basic_Amount = -1 * (Abs(Me.Basic_Amount))
End Sub
The crappy thing is every time a user enters a positive number your code runs before the number can be converted.
Is there a way to work in the code above to make sure it converts the number first, then checks to see if the numbers match?
Code:
Private Sub Basic_Amount_BeforeUpdate(Cancel As Integer)If Nz(Me.Basic_Amount, "") <> Nz(Me.Debit, "") Then
If MsgBox("The value you just entered does not match the original value. Would you still like to enter this value?", vbQuestion + vbYesNo) = vbNo Then
Cancel = True
End If
End If
End Sub