Odd Focus problem with Form/subform

W

WingLady

I've just upgraded to Access 2003, and am seeing an odd behavior in 2 new
forms, each with a subform.

I want to Tab through several controls on the Main form, then Tab into the
first control on the Subform. If I don't make any data changes to the
controls on the Main form, this works fine. However, if I change any data on
the Main form, the Focus seems to move to the 1st control on the Subform (as
expected), then the form display blinks, the hourglass comes on for a second,
and the Focus jumps back to the 1st control on the Main form.

I've also tried opening the Form, making one data change on the Main form,
then Clicking on a field in the Subform. The Focus stays there for an
instant, then I get the blinking, the hourglass, and the focus again jumps
back to the 1st control on the Main form.

I've played with the Cycle property on the subform, which hasn't helped;
double-checked the Tab Order and Tab Stop properties --- I'm baffled. Can
anyone help?
 
W

WingLady

Further information on the problem:

After simplifying the forms considerably, I've discovered the following:

I can now open the Form/Subform directly from the database container, and
the problem does not happen. The recordset in this case would be a few
hundred records (but I really want to filter for just one). I can manually
use the right-click and Filter to a single record, and everything still works
fine.

However, in real life I want to open this form from the OnClick event of a
look-up form (the user has found a specific Company they want to work with).
In the OnClick Event of the look-up form, I use the code:

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

When I open my problem form (frmCompanyDetail) using this code, I get the
weird Focus problems described in my original message.

I've been using this "drill-down" programming/user interface technique for
10 years! What's going on here?
 

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