ACC1x: Cannot db.OpenTable with Only Read Definition PermissionID: Q92811
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
When you have only Read Definition permissions on a table, you are unable
to open the table in order to examine the table definition from Access
Basic and you may receive the following error message:
No permission for '<Tablename>' (versions 1.x)
The table cannot be opened from Access Basic when you have only Read
Definition permission. You should have users Read Data permission for the
table if you need to examine the table definition with Access Basic.
If you have Read Definition permission, you can only look at the table
definition manually by opening the table in Design view as read-only.
This behavior is by design.
NOTE: This behavior does not exist in Microsoft Access version 2.0 because
of the ability to use data access objects (DAO) in Access Basic to obtain
the table definition. Instead of attempting to open a Table variable (as
shown below) which includes the data, you can open a Tabledef object,
which does not include data. Therefore, no error will occur.
Option Explicit
Sub Test ()
Dim Mydb As Database
Dim MyTable As Table
Set Mydb = CurrentDB()
Set MyTable = mydb.OpenTable("Table1")
MyTable.MoveFirst
MyTable.Close
Mydb.Close
End Sub
No permission for '<Tablename>'
Additional query words: rights
Keywords : kbusage ScrtOthr
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: March 12, 1999