B
BrentDA
Having a problem moving (tabbing) from a main form to a subform then to a 2nd
subform.
I have a main form with text boxes. The main form also has 2 subforms, also
with text boxes. I checked the Tab Order, and it shows correctly the names
of the text boxes on the main form, followed by the names of the 1st and 2nd
subforms.
In the 'On Open' of the 3 forms I have the following code to open the forms
with a new, blank record: DoCmd.GoToRecord , , acNewRec. That works great.
The code I have in the On Exit of the last text box in the main form (to go
to the 1st subform) is: Forms!frmsubForm1!nameoftextboxon1stsubform.SetFocus
When I tab from the last text box on the main form (after inputting numeric
data) to go to the 1st text box on the 1st subform, I get the following error:
"Run-time error '2450':
Database can't find the form 'frmsubForm1' referred to in a macro expression
or Visual Basic Code."
The name of the subform is correct. I just changed it for this example.
I have tried other code variations (including GoToControl) in On Load, After
Update and On Lost Focus of the last text box of the main form.
I think I'm going in the right direction. I'm just not exactly sure of the
wording on the code, or where to place the code.
Any assistance is greatly appreciated !
Thanks !
Brent
subform.
I have a main form with text boxes. The main form also has 2 subforms, also
with text boxes. I checked the Tab Order, and it shows correctly the names
of the text boxes on the main form, followed by the names of the 1st and 2nd
subforms.
In the 'On Open' of the 3 forms I have the following code to open the forms
with a new, blank record: DoCmd.GoToRecord , , acNewRec. That works great.
The code I have in the On Exit of the last text box in the main form (to go
to the 1st subform) is: Forms!frmsubForm1!nameoftextboxon1stsubform.SetFocus
When I tab from the last text box on the main form (after inputting numeric
data) to go to the 1st text box on the 1st subform, I get the following error:
"Run-time error '2450':
Database can't find the form 'frmsubForm1' referred to in a macro expression
or Visual Basic Code."
The name of the subform is correct. I just changed it for this example.
I have tried other code variations (including GoToControl) in On Load, After
Update and On Lost Focus of the last text box of the main form.
I think I'm going in the right direction. I'm just not exactly sure of the
wording on the code, or where to place the code.
Any assistance is greatly appreciated !
Thanks !
Brent