Tab Order: Form and Subforms

G

Guest

hi

I have a main form with 2 continuous subforms. Subform 1 (consisting of
just a textbox for each record) is below textbox 1 on the main form, then
further down the main form (beneath subform 1) is textbox2.

I have set the tab order so that sequentially the order should go textbox 1,
Subform 1, textbox 2 and have checked TabStop is set to yes for all these
controls. However, the tab won't move from Subform1 to textbox 2. Instead
the focus just stays in the subform. I've read posts on this forum and
checked for a requery in the subform - there isn't one. How can I tab to
textbox2 after subform1?

I've noticed that in the Tab Order window in design view that only "Subform"
appears in the tab order list, not the fields in the subform... this aside,
my 2nd subform has multiple controls which I have successfully set the order
for within the form... once again, the problem is in tabbing from the last
control on the form back to the main form...
Is this standard behaviour that needs to be overcome, or is there somthing I
need to check or do?

Looking forward to your advice
Rich
 
G

Guest

On the KeyDown Event you can write the code

If KeyCode = 9 Or KeyCode = 13 then
Forms![MainFormname]![TextFieldName].SetFocus
End If
When you press Tab (9) Or Enter (13) the focus will move to the text box
 
G

Guest

Hi Ofer,

Would a similar solution work for the following problem that I'm experiencing:

I have a form with two subforms, both subforms are in single form. When you
tab out of the last text box of the 1st subform Access loops back to the
first text box within the same subform essentially appearing to clear all
entries in the subform.

How can I get Access (2002) to tab to the first text box of the 2nd subform?

Thanks,
AG

Ofer said:
On the KeyDown Event you can write the code

If KeyCode = 9 Or KeyCode = 13 then
Forms![MainFormname]![TextFieldName].SetFocus
End If
When you press Tab (9) Or Enter (13) the focus will move to the text box
--
I hope that helped
Good luck


Rich1234 said:
hi

I have a main form with 2 continuous subforms. Subform 1 (consisting of
just a textbox for each record) is below textbox 1 on the main form, then
further down the main form (beneath subform 1) is textbox2.

I have set the tab order so that sequentially the order should go textbox 1,
Subform 1, textbox 2 and have checked TabStop is set to yes for all these
controls. However, the tab won't move from Subform1 to textbox 2. Instead
the focus just stays in the subform. I've read posts on this forum and
checked for a requery in the subform - there isn't one. How can I tab to
textbox2 after subform1?

I've noticed that in the Tab Order window in design view that only "Subform"
appears in the tab order list, not the fields in the subform... this aside,
my 2nd subform has multiple controls which I have successfully set the order
for within the form... once again, the problem is in tabbing from the last
control on the form back to the main form...
Is this standard behaviour that needs to be overcome, or is there somthing I
need to check or do?

Looking forward to your advice
Rich
 

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