ACC: Error Message Running Macro with SQL Statements

Last reviewed: May 28, 1997
Article ID: Q103176
The information in this article applies to:
  • Microsoft Access 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

Advanced: Requires expert coding, interoperability, and multiuser skills.

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 the following error message:

   In Microsoft Access 7.0 and 97:

      RunTime Error'3112': Record(s) can't be read; No Read Data permission
      on 'TableName'

   In Microsoft Access versions 1.x and 2.0:

      permissions denied

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 Owners Permissions property is ignored when they are run. If you do not have permissions for the underlying table, the error message stated above will occur.

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.

STATUS

This behavior is by design.

REFERENCES

For more information about the RunPermission Property, search the Help Index for "RunPermission Property," or ask the Microsoft Access 97 Office Assistant.


Keywords : kbusage ScrtOthr
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.