ACC2000: Error Message Running a Macro in a Secured Database (209264)
The information in this article applies to:
This article was previously published under Q209264 Advanced: Requires expert coding, interoperability, and multiuser skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
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'
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.
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.
REFERENCESFor 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.
Modification Type: | Minor | Last Reviewed: | 1/26/2005 |
---|
Keywords: | kbprb kbusage KB209264 |
---|
|