Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Odd tabbing behavior from main form to subform

Status
Not open for further replies.

wingpeople

Programmer
Oct 18, 2002
24
US
(I'm using Access 2003)
I have a main form and subform, with the subform being a Tab Stop after several of the fields on the main form. If I tab through the fields on the main form without making any data changes, the focus moves to the first control on the subform just as I would expect. Life is good.

However, if I make ANY data changes on the main form, and follow the same tab sequence, the focus seems to go to the 1st control on the subform, but then the display blinks, an hourglass appears for a second, and the focus jumps back to the 1st control on the main form. If I don't make further data changes, I can tab back to the subform.

Hitting Tab isn't the only way to see this annoying behavior. I can change one field on the main form, then Click on the 1st control in the subform. Blink, hourglass, and the focus has jumped back to the 1st control on the main form again!

I've double-checked my tab orders and Tab Stop properties on the main and subforms, and can't find anything wrong.

This is really ugly from a user point of view, and I've never seen this behavior before (but then again, I'm an old Access 97 relic). Any ideas?
 
No SetFocus nor GoToControl call in the AfterUpdate event procedure of the main form ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
No, no SetFocus or GoToControl calls.
More info (I messed with this for hours):
I started from scratch - new database container, new form. Started putting controls on the form, hopefully until the problem reappeared and/or was mysteriously solved.

Unfortunately, I just tested opening the form/subform directly from the database container instead of opening it using a Where condition from a prior form:

DoCmd.OpenForm "frmCompany", , , "[CompanyID]=" & Me!CompanyID

I thought I had re-created the entire thing with no more problems -- but then, when I opened it using the above statement, the tabbing problem re-appeared.

To recap: the tabbing problem happens when the Form is opened using the DoCmd.OpenForm statement shown above. The problem does NOT occur when I simply open the Form from the Database container (there would be a large recordset in this case; I've also tried filtering to a single CompanyID using the right-click filter -- this doesn't seem to make any difference).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top