I have a form that on the field the user inputs a number. On the
After Update event I have a event procedure that does some testing of the values on the form. If the user gets an error I'm using the MsgBox, but it does not focus back on the field that I indicate and it places the cursor in the next modifiable field there allowing them to by pass the error. Should I be using Msgbox for the error or another technique. Here is an example of one of my errors.
If (Me![bau_last_used] = 0 And Me![bau_first] <> Me![bau_low]) Then
MsgBox "First used must equal low value when Last Used is Zero"
Me.bau_first.SetFocus
Exit Sub
The user gets the MsgBox but the cursor is not set on the field indicated, but the next modifiable field. Therefore they can bypass the error.
Also, if the user has entered a number, but wants to clear the field, what is the key they hit to clear the number. It will not take space as it will fail the edits in the afterupdate event.
After Update event I have a event procedure that does some testing of the values on the form. If the user gets an error I'm using the MsgBox, but it does not focus back on the field that I indicate and it places the cursor in the next modifiable field there allowing them to by pass the error. Should I be using Msgbox for the error or another technique. Here is an example of one of my errors.
If (Me![bau_last_used] = 0 And Me![bau_first] <> Me![bau_low]) Then
MsgBox "First used must equal low value when Last Used is Zero"
Me.bau_first.SetFocus
Exit Sub
The user gets the MsgBox but the cursor is not set on the field indicated, but the next modifiable field. Therefore they can bypass the error.
Also, if the user has entered a number, but wants to clear the field, what is the key they hit to clear the number. It will not take space as it will fail the edits in the afterupdate event.