Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: Error Message Running a Macro in a Secured Database


View products that this article applies to.

Symptoms

When you run an action query SQL statement, either in a RunSQL macro statement or as the RowSource property for a control in a secured database, you may receive an error similar to the following:
RunTime Error'3112':
Record(s) cannot be read; no read permission on 'TableName'

↑ Back to the top


Cause

SQL statements used in a RunSQL macro or as the RowSource property for a control are not real objects; instead, they are compiled and built when they are run. Because they are not real objects in the Database window, they do not have an owner, and the Run With Owner's Permissions property is ignored when they are run. If you do not have permissions for the underlying table, you receive the error message mentioned in the "Symptoms" section.

↑ Back to the top


Resolution

Set the RowSource property to an intermediate query object that was created by the owner of the secured table. The query object should have the Run With Owner's Permissions property set.

↑ Back to the top


References

For more information about the RunPermission Property, click Microsoft Access Help on the Help menu, type runpermissions property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Article Info
Article ID : 209264
Revision : 3
Created on : 1/1/0001
Published on : 1/1/0001
Exists online : False
Views : 265