I have tried to get this working for two days now and I am pulling my hair out. Here is the scenario. I have a form called frm_MainMenu which has a subform called sfrm_Company
There is a search section on that subform that displayes its results in a popup continuous form called pfrm_CompanyList
There is a button beside each result that I want to first move the subform on the mainform to the appropriate company and then close the popup form
Take a look at this code for the button
Any help would be greatly appreciated as I am stumped. I have search here and elsewhere with no luck.
There is a search section on that subform that displayes its results in a popup continuous form called pfrm_CompanyList
There is a button beside each result that I want to first move the subform on the mainform to the appropriate company and then close the popup form
Take a look at this code for the button
Code:
Private Sub cmdOpenCompany_Click()
Forms!frm_MainMenu!sfrm_Company.SetFocus
Forms![frm_MainMenu]![sfrm_Company].Form![CompamyID].SetFocus
DoCmd.FindRecord Forms!pfrm_CompanyList!CompanyID, , , , , acCurrent
DoCmd.Close acForm, "pfrm_CompanyList"
Forms!frm_MainMenu!tabMainMenu.SetFocus
Forms!frm_MainMenu.tabMainMenu = 1
End Sub
Any help would be greatly appreciated as I am stumped. I have search here and elsewhere with no luck.