How to Check SharePoint Links at Access Database Startup
Question details
The user needs to test the connection to linked SharePoint tables when an Access database opens, aiming to block data entry if the connection is unavailable.
- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Opening a split Access database connected to SharePoint lists.
- Observed behavior
- The database needs to verify SharePoint connectivity upon startup and handle offline scenarios gracefully while supporting data resynchronization across ACCDB, ACCDE, and ACCDR files.
Ensure your split Access database has active linked SharePoint lists and that you have the necessary administrative permissions to create or edit macros.
Create an AutoExec Macro to Verify SharePoint Connection
Use a startup macro to read a small record from a linked SharePoint list. This validates the connection before allowing users to input data.
By implementing an AutoExec macro or a startup form, you can proactively check if the SharePoint server is reachable.
If the test read succeeds, the database proceeds normally. If it fails, you can block data entry and prompt the user to restore their network connection.
Open your Access database, navigate to the 'Create' tab on the ribbon, and select 'Macro'.
Set up an action to open a query or read a single record from one of your linked SharePoint lists.
Use an 'If' statement to evaluate the result. If an error occurs (indicating no connection), add a 'MessageBox' action instructing the user to reconnect to SharePoint and try again.
Save the macro with the exact name 'AutoExec'. Access will automatically execute this macro every time the database is opened.
Looking for a Lightweight Alternative to Microsoft Office?
While WPS Office does not include a database management tool like Access, it offers a robust, free suite for all your document, spreadsheet, and presentation needs with high compatibility with Microsoft Office formats.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the Software: Run the installer and follow the straightforward on-screen instructions to set up WPS Office on your device.
- 3. Open Your Documents: Launch WPS Office and seamlessly open your existing Word, Excel, or PowerPoint files without losing any formatting.

Frequently Asked Questions
Will Access prompt users to sign in to SharePoint?
Yes, when the network connection is available, Access will automatically prompt users to sign in to SharePoint if authentication is required.
Does local data resynchronization work with ACCDR files?
Yes, Access can resynchronize locally saved data to SharePoint across ACCDB, ACCDE, and ACCDR file formats equally.
What happens if the SharePoint connection drops during data entry?
Access can cache the data locally. Once the linked SharePoint lists become available and the connection is restored, Access will automatically resynchronize the locally cached data.




