In a Microsoft Access project, you can use the OpenDiagram action to open a database diagram in Design view.
The OpenDiagram action has the following argument.
Action argument | Description |
---|---|
Diagram Name | The name of the database diagram to open. The Diagram Name box in the Action Arguments section of the Macro window shows all database diagrams in the current database. This is a required argument.
If you run a macro containing the OpenDiagram action in a library database, Microsoft Access looks for the diagram with this name first in the library database, then in the current database. |
This action is similar to clicking the Design button
after clicking Database Diagrams under
Objects, and then selecting a database diagram in the Database window.
Tip You can select a database diagram in the Database window and drag it to a macro action row. This automatically creates an OpenDiagram action that opens the database diagram in Design view.
To run the OpenDiagram action in Microsoft Visual Basic, use the OpenDiagram method of the DoCmd object.