Validate and setfocus

  • Thread starter Thread starter E Schiele
  • Start date Start date
E

E Schiele

I am trying to validate a field on a form and simply
setfocus back to the field if the user clicks "No" in
a 'keep value?' message box. I validating
using 'AfterUpdate' event. I can see it go back to the
correct field for a split second, then it jumps to the
next field. I can't figure out why. If I
try 'BeforeUpdate', I get an error that I must save the
record before Setfocus. I would like to cancel the
update, but I don't see how to do that.

Any help is greatly appreciated!

Ed
 
Use the BeforeUpdate Event and instead of SetFocus, just set the argument
Cancel to True.
 
Did the trick! Thanks very much!
-----Original Message-----
Use the BeforeUpdate Event and instead of SetFocus, just set the argument
Cancel to True.

--
HTH
Van T. Dinh
MVP (Access)






.
 
Back
Top