Tab sequencing not working

J

JWCrosby

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
 
K

kc-mass

Add to the code that does the calculating and makes another control visible
a line like this:

Forms!YourForm!txtYour3rdControl.SetFocus
RegardsKevin
 
T

Tom van Stiphout

On Thu, 22 Apr 2010 16:26:01 -0700, JWCrosby

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
 
J

JWCrosby

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top