MS-Access: move to a NavigationControl using vba

Viewed 129

I have a form called frmAanlog with a NavigationControl on it. Using vba I would like to move to one of the forms that you normally reach by clicking on a NavigationButton in the Navigation Control. The form I would like to reach is called frmNavPlant.

I have tried variations of the following line, without success:

DoCmd.BrowseTo acBrowseToForm, "frmNavPlant", "frmAanlog.frmNavPlant"

Any suggestions here? Preferably I would jump to a specific record-ID in frmNavPlant, but already happy with a working jump to the correct form, with the NavigationControl indicating the right page.

1 Answers

Must reference Navigation Form subform container control name, not form name, in Path argument. Access defaults to NavigationSubform when Navigation Form is created.

DoCmd.BrowseTo acBrowseToForm, "frmNavPlant", "frmAanlog.NavigationSubform"

Related