I am at a loss on this one.
I have a form called frm_MainMenu
On this form is a Tab Control call tabMainMenu
On the second tab there is a button that opens pop up form with a list of companies
This is a continuos form and it has a button that is supposed to set the filtre on a subform of frm_mainMenu called sfrm_Employers
Next it closed the popup form
and finally, and this is where my problem exists, it is supposed to make the second tab of the tabc control active
Any suggestions wold be greatly appreciated.
I have a form called frm_MainMenu
On this form is a Tab Control call tabMainMenu
On the second tab there is a button that opens pop up form with a list of companies
This is a continuos form and it has a button that is supposed to set the filtre on a subform of frm_mainMenu called sfrm_Employers
Next it closed the popup form
and finally, and this is where my problem exists, it is supposed to make the second tab of the tabc control active
Code:
Private Sub cmdOpenCompany_Click()
'This Works
Forms!frm_MainMenu!sfrm_Company.Form.Filter = "CompanyID = Forms!pfrm_CompanyList!CompanyID"
'So does this
Forms!frm_MainMenu!sfrm_Company.Form.FilterOn = True
'And this also works
DoCmd.Close acForm, "pfrm_CompanyList"
'As well as this works
Forms!frm_MainMenu.SetFocus
'This DOES NOT. I get Run-Time error 424 Object Required.
tabMainMenu.Value = 1
End Sub
Any suggestions wold be greatly appreciated.