(MS Access 2016) I'm trying to change the selected tab on a NavigationControl on another form. This is my forms structure:
frm_nav > navSubForm(displaying: "frm_src_ma") > reSubForm ; reSubMenu
navSubForm: name of the Sub Form Control on frm_nav
reSubForm: name of the Sub Form control of the NavigationControl on frm_src_ma
reSubMenu: name of the Navigation Control on frm_src_ma
Now there are two tabs on reSubMenu:
- Data [navData ("frm_subsrc_ma")]
- Instances [navInstances ("frm_subinst_ma")]
On a floating form i have a button that when clicked i want reSubMenu to change tabs to Data whenever Instances is selected.
This is the code inside the Click Event on said button:
Forms![frm_nav]![navSubForm].SetFocus
DoCmd.BrowseTo ObjectType:=acBrowseToForm, _
ObjectName:="frm_subsrc_ma", _
PathToSubformControl:="frm_nav.navSubForm>frm_src_ma.reSubForm", _
DataMode:=acFormEdit
When either Data or Instances is selected and the button is pressed it throws this error: The macro action BrowseTo requires a valid Path argument
Screenshots for reference:
