Lock tables in an Access app

Important    Access Services 2010 and Access Services 2013 are being removed from the next release of SharePoint. We recommend you do not create new web apps, and migrate your existing apps to an alternative platform, such as Microsoft Power Apps.

You can lock a table in an Access web app to keep data from being edited or deleted. Locking tables helps when you want to include sample data in your web app that you provide to users of the app. Locking is especially useful when you plan to distribute an Access app in your App Catalog or in the SharePoint Store. After you lock a table, you can upgrade the web app later without overwriting the data that users have stored in their instances of your web app.

Note: The option to lock tables is available only for Access web apps that are on Microsoft 365 or SharePoint Online sites. To see the Lock option, you also need to have Access 2013 with Office 2013 Service Pack 1 (SP1) or higher installed on your computer or device.

  1. Open the web app in Access and select the table you want to lock from the Table Selector in the left pane.

  2. Click Settings/Actions > Lock.

    Lock command on the Settings menu

    The Lock icon appears next to the name of the table.

    Locked icon appearing on a locked table in Access

    Tip: To unlock a table, follow the same steps and click Unlock.

What happens when you lock a table in an Access web app?

Data in locked tables is read-only for users, which means no one can edit it from either Access or from the browser. If you need to add data to a locked table, you need to unlock it first, and then you can lock the table later.

When users upgrade an app by installing a new version from the App Catalog or the SharePoint Store, new data in any locked table overwrites data in the app. This should be okay, since users can store data only in unlocked tables and data from unlocked tables is not included in app packages for deployment.

An app author can use an On Deploy Data Macro to move the data from a locked table to another table when the upgrade is deployed. This preserves the end user’s data, and appends it with the app author’s data.

A subscription to make the most of your time

Need more help?

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.