Tabbing between controls (subforms)

Kenln

Registered User.
Local time
Today, 14:21
Joined
Oct 11, 2006
Messages
551
If I understand correctly when you tab to a subform it only tabs within that subform's controls.

Is there any way to have the subform (controls) just like any control on a main form?

Tab -> Control 1
Tab -> Control 2
Tab -> subForm Control 1
Tab -> subForm Control 2
Tab -> Control 4

etc...

Thank you,
 
is the subform's Tab Stop property set to Yes?
 
Yes it is.
 
er, not really sure what the problem is. what is or isn't happening?
 
If I need a specific tabbing order which is outside of the normal realm, I put a text box (very, very small - 1 pixel) on the form and set it to be in the tab order just after the one I am wanting to move from to the subform and then in the GotFocus event I put:

Me.YourSubformControlNameHere.Form.TheNextTextBoxNameHere.SetFocus

And then in the subform I do the same thing with a micro text box and put

Me.Parent.TheControlIWantToMoveToHere.SetFocus

And that should work.
 
I'm still doing something wrong.

I started with the subform (code below). All it does is move between the three text boxes within the subform.

Code:
Me.Parent.sfrm_PE_Worksheet_CO_TM.Form.txt_Budget_CO_Projected.SetFocus

It looked simple but I'm still stuck???
 
I'm still doing something wrong.

I started with the subform (code below). All it does is move between the three text boxes within the subform.

Code:
Me.Parent.sfrm_PE_Worksheet_CO_TM.Form.txt_Budget_CO_Projected.SetFocus

It looked simple but I'm still stuck???

OUCH! Totally wrong code. Is this supposed to be the code moving back to the Main form or going TO the subform?
 
Totally wrong???

I have a couple of combo boxes on the main form that you can tab to. Then I have multiple subforms. So.... it would be nice to move from subform_a:control_a to mainform:control_xxx.

But... I what I need is:
  • Move from mainform:control_c to subform_a:control_a
  • Move from subform_a:control_b to subform_b:control_a
  • etc...

Or I could put a one pixel text box on the main form between each subform?

Question, could I just use a text box (on the main form) that normally doesn't get focus?

Thanks,
 
Totally wrong???
I thought so, but if you have two subforms then maybe not completely.
But... I what I need is:
  • Move from mainform:control_c to subform_a:control_a
  • Move from subform_a:control_b to subform_b:control_a
  • etc...

The code would be for the first:

Me.Subform_a.Form.Control_a.SetFocus

(remembering to use the subform CONTROL name and not the subform name. So if the subform CONTROL name is Subform_a then that is what you would use.)

For the second -

Me.Parent.Subform_b.Form.Control_a.SetFocus

Or I could put a one pixel text box on the main form between each subform?

Question, could I just use a text box (on the main form) that normally doesn't get focus?
I usually just use the special 1 pixel text box so that it doesn't conflict with anything else.
 
Hmmm, closer I think but???

From mainform: I don't think it is really working. It tabs from the last text box to this one (txt_Move_Focus_1). Then I tab again and it moves from here (txt_Move_Focus_1) to the subform.

This is on the control in the main form.
Code:
Private Sub txt_Move_Focus_1_GotFocus()
    Me.sfrm_PEPM_Worksheet_End_Dates.Form.txt_Proj_Date_End.SetFocus
End Sub

Once on the subform it just bounces betwen the three text boxes. Two normal ones and the third which is suppose to move the focus.

This is on the control on the first subform.
Code:
Private Sub txt_Move_Focus_GotFocus()
     Me.Parent.sfrm_PE_Worksheet_CO_TM.Form.txt_Budget_CO_Projected.SetFocus
End Sub
 
Try changing the code from:

Me.Parent.sfrm_PE_Worksheet_CO_TM.Form.txt_Budget_CO_Projected.SetFocus

to this

Me.Parent.sfrm_PE_Worksheet_CO_TM.Form.SetFocus
Me.Parent.sfrm_PE_Worksheet_CO_TM.Form.txt_Budget_CO_Projected.SetFocus
 
Sigh...

not yet. Run-Time (or is it a Fun-Time) Error
 

Attachments

  • RT Error 2449.JPG
    RT Error 2449.JPG
    11.6 KB · Views: 147
it's all remote data....

Will that work?

For your copy just delete all of the linked tables and then do an IMPORT but select the option to just import the structure (we can do without the data). Then the tables will be in the frontend so we can do what we need to.
 
Can I email it directly to you rather than make it public?
 
All of the tables are comming from MSSQL
Yes, and the structure thing I said should work for that too. As long as you select IMPORT and not LINK and then in the expanded options (click the options button to the right) you select Structure Only.

Can I email it directly to you rather than make it public?
sure thing. I'll PM you my email address to use.
 

Users who are viewing this thread

Back
Top Bottom