The main form has a focus and the sub-form has a focus. From the sub-form, if you set (change) the focus on the main form, you don't change which control on the sub-form has the focus.
You have to change which control on the sub-form has the focus.
Code:
Private Sub cmdAccept_Click()
...
With Forms![frmMainMenu].[cmdFixtureSchedulePrint]
...
.setFocus '<<=== only changes which control has the focus on the main form
End With
Me.cmdAccept.Enabled = False '<--- this is the line that results in an error /Me.cmdAccept still has the focus
Try this
Code:
Private Sub cmdAccept_Click()
...
With Forms![frmMainMenu].[cmdFixtureSchedulePrint]
...
.setFocus '<<=== only changes which control has the focus on the main form, not the sub-form
End With
Me.SomeOtherControl.Setfocus , << a different control on the sub-form
Me.cmdAccept.Enabled = False '<<== cmdAccept does not have focus, cmdAccept is disabled