From: JWCrosby on
Let me see if I can explain this...

I have three controls on a form. They are set as tab stops, numbered 0, 1,
2. Control #2 has an "on lost focus" procedure attached that does some
calculating and makes another control visible if certain criteria are met.

However, after tabbing off of control #2, while it does the calculating, it
doesn't "move on" to the 3rd control. It goes back to #1, or the zero tab.

How can I get it to do the calculating and then move to the next control?

Thanks in advance.

Jerry
From: kc-mass on
Add to the code that does the calculating and makes another control visible
a line like this:

Forms!YourForm!txtYour3rdControl.SetFocus
RegardsKevin
"JWCrosby" <JWCrosby(a)discussions.microsoft.com> wrote in message
news:3C7441E3-ACF0-497E-8485-F23FFF30E614(a)microsoft.com...
> Let me see if I can explain this...
>
> I have three controls on a form. They are set as tab stops, numbered 0,
> 1,
> 2. Control #2 has an "on lost focus" procedure attached that does some
> calculating and makes another control visible if certain criteria are met.
>
> However, after tabbing off of control #2, while it does the calculating,
> it
> doesn't "move on" to the 3rd control. It goes back to #1, or the zero
> tab.
>
> How can I get it to do the calculating and then move to the next control?
>
> Thanks in advance.
>
> Jerry


From: Tom van Stiphout on
On Thu, 22 Apr 2010 16:26:01 -0700, JWCrosby
<JWCrosby(a)discussions.microsoft.com> wrote:

It's probably better to use the control's AfterUpdate event.
If your code does a Requery, that might have the effect of putting the
focus back to the first control.

-Tom.
Microsoft Access MVP


>Let me see if I can explain this...
>
>I have three controls on a form. They are set as tab stops, numbered 0, 1,
>2. Control #2 has an "on lost focus" procedure attached that does some
>calculating and makes another control visible if certain criteria are met.
>
>However, after tabbing off of control #2, while it does the calculating, it
>doesn't "move on" to the 3rd control. It goes back to #1, or the zero tab.
>
>How can I get it to do the calculating and then move to the next control?
>
>Thanks in advance.
>
>Jerry
From: JWCrosby on
I moved it to the AfterUpdate event and it fixed it. Can't recall why I was
using the OnLostFocus event, but I may find out soon!

Thanks.

Jerry

"Tom van Stiphout" wrote:

> On Thu, 22 Apr 2010 16:26:01 -0700, JWCrosby
> <JWCrosby(a)discussions.microsoft.com> wrote:
>
> It's probably better to use the control's AfterUpdate event.
> If your code does a Requery, that might have the effect of putting the
> focus back to the first control.
>
> -Tom.
> Microsoft Access MVP
>
>
> >Let me see if I can explain this...
> >
> >I have three controls on a form. They are set as tab stops, numbered 0, 1,
> >2. Control #2 has an "on lost focus" procedure attached that does some
> >calculating and makes another control visible if certain criteria are met.
> >
> >However, after tabbing off of control #2, while it does the calculating, it
> >doesn't "move on" to the 3rd control. It goes back to #1, or the zero tab.
> >
> >How can I get it to do the calculating and then move to the next control?
> >
> >Thanks in advance.
> >
> >Jerry
> .
>