G
Guest
Hi
I have 1 Main form with more than 20 subforms. I have created a code below
on every the On Exit event of every subform to move to the next field of the
next subform.
Private Sub Corporate_Objectives_Exit(Cancel As Integer)
Me.Parent.SetFocus
Me.Parent.RSF017_BranchObjectives.SetFocus
Me.Parent.RSF017_BranchObjectives.Form.Branch_Objectives.SetFocus
End Sub
It works fine when moving from subform to the next on the current record.
But when I tried to create a new record the error message coming up as below.
Run Time error "2110"
Microsoft Access can't move the focus to the control of the "subform name"
Also another error with "Automation error".
I would appreciate it could you please tell me why I have this problem.
I don't have this problem when there are only 5 subforms, but now I have 20
subforms. Will the number of subforms cause the error.
Also how to move out of the last subform to the main form to create a new
record?
Thanks
Hong
I have 1 Main form with more than 20 subforms. I have created a code below
on every the On Exit event of every subform to move to the next field of the
next subform.
Private Sub Corporate_Objectives_Exit(Cancel As Integer)
Me.Parent.SetFocus
Me.Parent.RSF017_BranchObjectives.SetFocus
Me.Parent.RSF017_BranchObjectives.Form.Branch_Objectives.SetFocus
End Sub
It works fine when moving from subform to the next on the current record.
But when I tried to create a new record the error message coming up as below.
Run Time error "2110"
Microsoft Access can't move the focus to the control of the "subform name"
Also another error with "Automation error".
I would appreciate it could you please tell me why I have this problem.
I don't have this problem when there are only 5 subforms, but now I have 20
subforms. Will the number of subforms cause the error.
Also how to move out of the last subform to the main form to create a new
record?
Thanks
Hong