I'm considering using the LostFocus event. instead of leave.. It looks like
they both get fired? Though it would appear that possibly the Leave event
doesn't get fired in the scenario I describe whereas the LostFocus even
does??? (I've not tested this yet but I'm presuming that it should).
So, to guarantee that my data gets updated, where should I put my updating
code? LostFocus? Leave? or perhaps should I use Validated or Validating???
Do I need to do the update in multiple events (with the pain of running the
update code twice???)
Hope somebody can ease my confusion!!
Regards
Simon
"Simon Verona" <ne**@aphroditeuk.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have a usercontrol with code in the "leave" event which updates the
final data back into a database.
This works fine except if I have a default "accept" button on a form and
invoke it by pressing the ENTER key on the keyboard. In this case, it
would appear that whilst the code on the button is executing and therefore
presumably the button actually has focus, the leave event in the user
control is not fired.
Should I be interfacing with another event on the usercontrol instead of
the "leave" event.. or is there some other way round the problem?
Thanks in advance
Simon