Others

Export an Embedded Form Event Macro in Access 2016

Tauseeq MagsiTauseeq Magsi Nov 25, 2026 869 views

Question details

Transfer a button's embedded On Click macro from an Access 2016 form to another database.

Export an Embedded Form Event Macro in Access 2016
Product
Microsoft Access 2016
Device & OS
not provided
Scenario
A form button uses a macro created in Macro Builder, and the user wants to reuse it in another database.
Observed behavior
The macro does not appear as a separate macro object or as VBA code in the Visual Basic Editor.
Before you start

Identify the form and button that contain the On Click macro, and locate the destination Access database. Check which tables, queries, and other objects the form and macro use so you can reconnect them after the transfer.

Solution 1Recommended

Export the form containing the embedded macro

Use this method to transfer the button and its embedded event macro together to another Access database.

An embedded event macro is stored with its form, not as a standalone macro object or VBA procedure. Exporting the form carries the macro with it, but related tables and queries may need to be transferred or linked separately.

1
Locate the form

Open the source database in Access and find the form in the Navigation Pane.

2
Export the form

Right-click the form, select Export > Access, and browse to the destination database.

3
Complete the export

Choose a name for the exported form and complete the export dialog.

4
Reconnect dependencies

Open the destination database, open the exported form in Design View, and check its Record Source in the Property Sheet. Add or link any required tables and queries, and check other objects referenced by the macro.

5
Test the button

Open the exported form in Form View and click the button to confirm that its On Click macro runs as expected.

Export the form containing the embedded macro
The macro is not exported separately: To inspect the macro, open the form in Design View, select the button, and open its On Click property in the Property Sheet.
Free Microsoft Office alternative

Use WPS Office for documents alongside your Access database

WPS Office is a free, lightweight, easy-to-use alternative for everyday documents, spreadsheets, and presentations. Its familiar interface and Microsoft Office format support make it easy to move existing files, but it does not export Access macros or replace Access for editing ACCDB databases.

Keep using Access for embedded form macros while working on related documents in WPS OfficeOpen and edit Microsoft Office formats including DOCX, XLSX, and PPTXWork in a familiar interface that makes migration easierUse a free, lightweight office suite for everyday tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why can't I find the button macro in the Navigation Pane?

An embedded On Click macro is stored with the form rather than as a separate macro object. Open the form in Design View, select the button, and inspect its On Click property in the Property Sheet.

Why doesn't the macro appear in the Visual Basic Editor?

A macro created with Access Macro Builder is not automatically stored as VBA code. Open the button's On Click property to inspect the embedded macro in Macro Builder.

Will exporting the form also transfer its tables and queries?

Do not assume that exporting the form transfers its dependencies. In the destination database, check the form's Record Source and the objects referenced by its macro, then import or link what it needs.

How can I distribute future changes to multiple users?

Consider splitting the Access database into a back end containing tables and a front end containing forms and other interface objects. You can then distribute an updated front end when the form or its embedded macro changes.