Create a Read-Only SQL Server Connection in Microsoft Access
Question details
Retrieve SQL Server data in Microsoft Access for read-only reporting without exposing editable linked tables.

- Product
- Microsoft Access and Microsoft SQL Server
- Device & OS
- not provided
- Scenario
- A user wants to run reports on SQL Server data from Access without allowing changes to the source database.
- Observed behavior
- Access retrieves data through a pass-through query using a SQL Server account that has permission to read the required data but not modify it.
Obtain the SQL Server name, database name, and credentials for an account authorized to read the required data. Confirm that a compatible SQL Server ODBC driver or data source is available to Access.
Create a Read-Only Pass-Through Query in Access
Use a pass-through query to send a SELECT statement to SQL Server without creating an editable linked table.
The SQL Server account's effective permissions enforce read-only access; a SELECT statement or pass-through query alone is not a security boundary.
Ask the SQL Server administrator to grant the reporting account SELECT permission on the required tables or views and verify that it has no effective permissions to modify data, including permissions inherited through roles.
In Access, select Create > Query Design. Close the table selection window if it appears, then switch to SQL View.
On the Query Design tab, select Pass-Through. Open the query's Property Sheet if it is not already visible.
In the Property Sheet, set ODBC Connect Str using the connection builder or an appropriate ODBC connection string for the SQL Server database. Set Returns Records to Yes.
In SQL View, enter a SQL Server SELECT statement for the required tables or views. Select Run to retrieve the results, then save the query for reporting.

Review Exported SQL Reports in WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Microsoft Office formats, making it easy to move exported reports into a spreadsheet workflow. It does not replace the Access pass-through connection or enforce SQL Server permissions.

Frequently Asked Questions
Does a pass-through query make the SQL Server account read-only?
No. The database administrator must configure and verify the account's effective SQL Server permissions. A pass-through query sends SQL to the server but does not restrict what the account is allowed to do.
Where do I enter the SQL Server connection in Access?
Open the pass-through query in Design or SQL View, display its Property Sheet, and set ODBC Connect Str using the connection builder or an appropriate ODBC connection string.
Why is my pass-through query not returning rows?
Check that Returns Records is set to Yes in the query's Property Sheet. Also verify the ODBC connection, the SELECT statement, and the account's permission to read the requested tables or views.
Can I use a view instead of a table for reporting?
Yes. The administrator can grant the reporting account SELECT permission on an appropriate SQL Server view, and you can reference that view in the pass-through query's SELECT statement.




