Tab sequencing not working

  • Thread starter Thread starter JWCrosby
  • Start date Start date
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
 
Add to the code that does the calculating and makes another control visible
a line like this:

Forms!YourForm!txtYour3rdControl.SetFocus
RegardsKevin
 
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
 
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
 
Back
Top