Advanced Database – Assign/attach a macro to a command button

Open the form and select Tools->Customize

Select the ‘Standard’ Toolbar from the drop-down list.

29 Assign attach a macro to a command button

Click Add Command.

30 Add Command

At the bottom of the Category section, select LibreOffice Macros.

Navigate to the ‘Newrecord’ macro we created.

Click Add.

31 New Record

Notice that there is now a button on the Standard form toolbar that says Newrecord.

If you click on this button it runs the macro and creates a new record.

This makes it a bit simpler and more clear for a novice user, rather than asking them to use the New record icon.