Before Update event for Form

M

mscertified

Why is it I cant use 'setfocus' in this event? I validate field contents here
and would like to set the focus to fields that are invalid. Am I doing this
wrong? Is there a better way? Thanks.
 
M

Marshall Barton

mscertified said:
Why is it I cant use 'setfocus' in this event? I validate field contents here
and would like to set the focus to fields that are invalid.


Can't tell what's wrong without seeing the event procedure,
but what you are describing is the normal way to do it.
 
R

Rick_C

I have had the same problem... The work around that I found was that I put
the code in the AfterUpdate event and if it is not what I want, I use the
DoCmd.CancelEvent and then SetFocus.

It seems to work this way.

Rick
 
Top