G
Guest
OK, I have a field that I am checking the value that is entered. If the
value does not match the criteria then I pops up a msgbox and telss the user
that it is wrong. I am using the afterupdate event for this. What i Can't
get to happen is to set the focus back on that field so they have to enter a
correct value before moving on.
Hre is my code
Private Sub Debit_AfterUpdate()
If Me.Debit > 0 Then
MsgBox "This field requires a negative amount.", vbOKOnly, "Wrong value"
Debit.SetFocus
End If
Net = Debit
End Sub
value does not match the criteria then I pops up a msgbox and telss the user
that it is wrong. I am using the afterupdate event for this. What i Can't
get to happen is to set the focus back on that field so they have to enter a
correct value before moving on.
Hre is my code
Private Sub Debit_AfterUpdate()
If Me.Debit > 0 Then
MsgBox "This field requires a negative amount.", vbOKOnly, "Wrong value"
Debit.SetFocus
End If
Net = Debit
End Sub