Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Fern Sanchez   on Nov 02 In MS Office Category.

  
Question Answered By: Kathleen Adams   on Nov 02

The order of firing events can be a bit confusing sometimes.

What's happening is that the afterupdate event is firing because you've
given the focus  to another control.. Say a command button. Now that control
has the focus. Your code is then setting the focus to the text box  correctly
but in order for the afterupdate event to happen you hvave to have left the
text box... Excel says... Angon.. I'm somewhere else or else I couldn't do
the afterupdate.. I'll go back there.... And puts you back in the control
that had the focus in order for the afterupdate event to fire.

Try putting the Me.txtCourseDate.SetFocus in the Enter event of the control
that now has the focus.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Userform Field Validation Or get search suggestion and latest updates.


Tagged: