You can use Ctrl+TAB to "tab" from a subform to the main form.
You also can use a control's event procedure to do it for you. There are a
couple of ways you can do this:
(1) Use the OnExit event of the "last" control (the one that will have the
focus last, when you want to go to the main form) on the subform to set
focus to a specific control on the mainform:
Private Sub ControlNameOnSubform_Exit(Cancel As Integer)
Me.Parent.ControlNameOnMainForm.SetFocus
End Sub
(2) Use an almost invisible textbox as the last control in the subform's tab
sequence (textbox has height of zero and width of zero), and use that
textbox's GotFocus event to set focus to control on main form:
Private Sub TinyControlNameOnSubform_GotFocus()
Me.Parent.ControlNameOnMainForm.SetFocus
End Sub