R
Randy
I have this code to prevent data entry errors when [SumFee] (Currency) do
not add up on my form. It usually works fine. On a few occasions the fee's
did not balance. The user became distracted and inserted a new record, thus
allowing inaccurate entries to be entered in the table. I need a way to
prevent a new record being entered or moving back and forth between records
unless the [Sumfee] balances...Any Ideas?
Private Sub Totalfee_Exit(Cancel As Integer)
If Accountsubform.Form!SumFee <> [Debit] Then
If MsgBox("Total Fee's Do Not Agree. Review Fee's and make
necessary correction", vbYes + vbDefaultButton2) <> vbYes Then
Cancel = True
Me.Form![Debit].SetFocus
End If
End If
End Sub
not add up on my form. It usually works fine. On a few occasions the fee's
did not balance. The user became distracted and inserted a new record, thus
allowing inaccurate entries to be entered in the table. I need a way to
prevent a new record being entered or moving back and forth between records
unless the [Sumfee] balances...Any Ideas?
Private Sub Totalfee_Exit(Cancel As Integer)
If Accountsubform.Form!SumFee <> [Debit] Then
If MsgBox("Total Fee's Do Not Agree. Review Fee's and make
necessary correction", vbYes + vbDefaultButton2) <> vbYes Then
Cancel = True
Me.Form![Debit].SetFocus
End If
End If
End Sub