Hello,
I am having some issues with displaying a subform within a navigation form. please, could someone help me to understand the BrowseTo macro? There is the PathToSubformControl argument which I cannot really understand. Perhaps it is because I did not understand a structure of forms, subforms, subform controls etc.
I have a Form called "frm_navigation" that consists of Navigation Tabs. This form contains two subforms frm_vacancies and frm_organizations that are assigned to tables tbl_vacancies and tbl_organizations, respectively.
In the tab "Vacancies" and the subform "frm_vacancies", there is a field "Organization name" that displays an assigned name of an organization which is related to a vacancy. The name is taken from the other table tbl_organizations. I would like to program a button that would display / focus the "Organization" tab with a record related to current organization id.
So far I did it via DoCmd.OpenForm but it filters out all other records and opens a new window. I tried to set BrowseTo action as follows:
but I've got runtime error as my PathToSubformControl is wrong. How am I supposed to specify the path? I cannot understand the structure. It's supposed to follow this pattern: MainForm1.Subform1 > Form1.Subform1 but it's not really explained well on office.com to be frank.
I hope I managed to give you a clear idea what I am trying to achieve.
Thanks
PS> It may help if I provide names of Tabs in Navigation Form which are following: nav_vacanies and nav_organizations
Attachment:
I cannot include pictures yet so please find the screenshot under this link
zebik.republika.pl/frm_navigation.jpg
I am having some issues with displaying a subform within a navigation form. please, could someone help me to understand the BrowseTo macro? There is the PathToSubformControl argument which I cannot really understand. Perhaps it is because I did not understand a structure of forms, subforms, subform controls etc.
I have a Form called "frm_navigation" that consists of Navigation Tabs. This form contains two subforms frm_vacancies and frm_organizations that are assigned to tables tbl_vacancies and tbl_organizations, respectively.
In the tab "Vacancies" and the subform "frm_vacancies", there is a field "Organization name" that displays an assigned name of an organization which is related to a vacancy. The name is taken from the other table tbl_organizations. I would like to program a button that would display / focus the "Organization" tab with a record related to current organization id.
So far I did it via DoCmd.OpenForm but it filters out all other records and opens a new window. I tried to set BrowseTo action as follows:
Code:
DoCmd.BrowseTo acBrowseToForm, "frm_Organizations", "frm_navigation.nav_organizations", "[tbl_organizations].[PR_ID]=" & Me.cb_org_name.Value
but I've got runtime error as my PathToSubformControl is wrong. How am I supposed to specify the path? I cannot understand the structure. It's supposed to follow this pattern: MainForm1.Subform1 > Form1.Subform1 but it's not really explained well on office.com to be frank.
I hope I managed to give you a clear idea what I am trying to achieve.
Thanks
PS> It may help if I provide names of Tabs in Navigation Form which are following: nav_vacanies and nav_organizations
Attachment:
I cannot include pictures yet so please find the screenshot under this link
zebik.republika.pl/frm_navigation.jpg