I have a main entry for and a tab control with 5 pages. Each page has an independant sub form which each tie 1 to many to the main form. I want to allow users to tab through from the first field on the main through each sub form and back to the main form. I have done this in the past by using an invisible text box that has code to move the focus to the next form | first field. This is how it works.
I have an unbound text box on the main form and each sub form called txtExit. It is invisible and is also the last field in the tab order on each form. In the Enter property of the control I have the following code:
This works going form the main form to the first sub form and it works going from the first sub form on the first page of the tab control to the second sub form on the second page of the tab control. Once I tab through the second sub form's controls, it just keeps tabbing through that form and doesn't go to the next form. I have checked the code to the names of the controls on the 3rd form and copy pasted the names. I have checked that the txtExit on the 2nd form has a tab stop yes, etc.
What am I missing? Is there a better way to do this, please?
Any help is greatly appreciated.
misscrf
It is never too late to become what you could have been ~ George Eliot
I have an unbound text box on the main form and each sub form called txtExit. It is invisible and is also the last field in the tab order on each form. In the Enter property of the control I have the following code:
Code:
Private Sub txtExit_Enter()
Forms![frmMain]![frmSubForm1].SetFocus
Forms![frmMain]![frmSubForm1].Form![SubForm1FirstField].SetFocus
End Sub
This works going form the main form to the first sub form and it works going from the first sub form on the first page of the tab control to the second sub form on the second page of the tab control. Once I tab through the second sub form's controls, it just keeps tabbing through that form and doesn't go to the next form. I have checked the code to the names of the controls on the 3rd form and copy pasted the names. I have checked that the txtExit on the 2nd form has a tab stop yes, etc.
What am I missing? Is there a better way to do this, please?
Any help is greatly appreciated.
misscrf
It is never too late to become what you could have been ~ George Eliot