Add custom actions to the Action Bar in Access apps
Important Microsoft no longer recommends creating and using Access web apps in SharePoint. As an alternative, consider using Microsoft PowerApps to build no-code business solutions for the web and mobile devices. |
You can add custom action buttons to the Action Bar in Access web apps to control different tasks. For example, you might want to create a custom action button to hide or show different controls on a view or run a macro to perform various tasks. To add custom action buttons to the Action Bar, you'll need to have permissions to make design changes to the Access web app. You can use the following procedures or watch a video.
For more information on creating Access web apps, see creating an Access app.
This article doesn't apply to Access desktop databases. For information concerning forms and navigation in desktop databases, see create an Access form.
Add a custom action button
-
Open the app in Access.
-
Click the table caption name in the Table Selector in the left pane and then click the view you want to add the custom action in the View Selector across the top.
-
Click the Edit button in the middle of the view preview window to open it in design mode where you can modify the view contents.
-
Click the Add custom action icon on the right side of the Action Bar.
-
Click the new custom action button Access created and then click the Data property button.
-
Add the following properties:
-
Control Name: Type a name for the new custom action.
-
Tooltip: You can add a short description of the action. This helps users of the Access app understand the purpose of this custom action button.
-
Icon: Click the up-arrow or down-arrow and select an icon from the gallery or you can leave the default icon Access selected. To avoid duplicate icons, make sure that you select one that is not already on the Action Bar.
-
-
Click the On Click button and add a macro action. This is where you define what actions you want Access to do when users click this custom action button in their browser. For more information about creating macro actions see customizing a view by creating a user interface macro.
-
Right-click the macro tab, click Save > Close to save your macro changes for the custom action.
Note: If Access displays a message indicating you've reached the maximum limit of actions for the view, you'll need to delete existing custom actions before you can add new ones. You can have a total of 12 action buttons, including built-in action buttons, on a view in an Access app.
-
Click Save on the Quick Access Toolbar to save your view changes.
Move a custom action button on the Action Bar
-
Click and hold the button, and drag it to a new position on the Action Bar.
Edit a custom action button
-
Open the app in Access.
-
Click the table caption name in the Table Selector in the left pane and then click the view you want to edit in the View Selector across the top.
-
Click the Edit button in the middle of the view preview window to open it in design mode where you can modify the view contents.
-
Click the custom action button that you want to modify.
-
Click the Data property, and make any changes.
-
Click Save on the Quick Access Toolbar to save your view changes.
Delete a custom action button
-
Open the app in Access.
-
Click the table caption name in the Table Selector in the left pane and then click the view you want to edit in the View Selector across the top.
-
Click the Edit button in the middle of the view preview window to open it in design mode where you can modify the view contents.
-
Select the custom action button and press Delete on your keyboard.
-
Click Save on the Quick Access Toolbar to save your view changes.
Note: You can simultaneously delete multiple custom actions by pressing and holding the CTRL key while clicking different custom action buttons and then pressing Delete on your keyboard. When you delete a custom action, the button disappears from the Action Bar and the associated macro logic is deleted from the view.
Undo a deleted custom action button
-
Click the Undo button on the Quick Access Toolbar.
Example video
This video shows you how to add two custom action buttons to the Action Bar for a datasheet view--one that applies a filter to the datasheet, and another that clears all filters.
Next Steps
-
Learn how to customize a view with a user interface macro.
-
See how you can automate startup events with a macro.
No comments:
Post a Comment