Setfocus

  • Thread starter Thread starter sigh
  • Start date Start date
S

sigh

Hi,
I got two Text boxes. If I input wrong informations
into the BOX1 and press enter key to move to the next
field box2. I will got a message as error and I want it to
stay on the BOX1 instead of give me a message and move to
BOX2.
How can I do that? and on what poperty Event should I used?

Any help would be very appreciated.
 
I think that the 'BeforeUpdate' is the event that will
work best in this situation.
So write your code..

If BOX1.Value = "Test1" Then
Exit Sub
Else
MsgBox "Wrong data,try again"
Cancel = True
End If
 
If I input wrong informations
into the BOX1 and press enter key to move to the next
field box2. I will got a message as error and I want it to
stay on the BOX1 instead of give me a message and move to
BOX2.

Look up help for ValidationRule. You can set a VR either on the field in
the table or in the control on the form (or both...)

HTH


Tim F
 
Back
Top