No Delete Permission on 'MSysObjects'

S

SteveC

I want to delete an unused table in my database. It says I cannot delete it
because there is a relationship. So I go to the Relationships window and
try to delete it and it says "No Delete permission on 'MSysObjects'" I have
Admin privileges; there are no passwords, and I checked through Permissions
and cannot find anyplace where I don't have permissions.

Newbie here obviously. Thanks.
 
J

John Vinson

I want to delete an unused table in my database. It says I cannot delete it
because there is a relationship. So I go to the Relationships window and
try to delete it and it says "No Delete permission on 'MSysObjects'" I have
Admin privileges; there are no passwords, and I checked through Permissions
and cannot find anyplace where I don't have permissions.

Newbie here obviously. Thanks.

You do NOT want to delete the Access systems table MSysObjects. It is
the repository for all of your Forms, Reports, Queries, Tables,
Modules and Macros. If you should succeed in deleting it (you won't),
you'll have no database.

What is the name of the table you're trying to delete? What exactly
are you trying to delete in the relationships window? The join line
(correct) or the table icon (won't do anything)? What action triggers
this error message?

John W. Vinson[MVP]
 
S

SteveC

I get this when I highlight the join line and hit delete. It gives me a
confirmation box, and then says no permission. There is a little infinity
sign above the join line. I downloaded a template from MS and am trying to
personalize it. Thought this would be easier for someone who uses Word and
Exel but never Access. Ha. Thanks!
 
J

John Vinson

I get this when I highlight the join line and hit delete. It gives me a
confirmation box, and then says no permission. There is a little infinity
sign above the join line. I downloaded a template from MS and am trying to
personalize it. Thought this would be easier for someone who uses Word and
Exel but never Access. Ha. Thanks!

What are the names of the two tables involved? Does it make any
difference if you use Tools... Database Utilities... Compact and
Repair Database?

John W. Vinson[MVP]
 
S

SteveC

One table is assets; the other is depreciation. I don't need depreciation
so want to delete it; have deleted all the fields dealing with depreciation
on the Assets table. AssetID is what is tied to Asset ID on Depreciation,
which is the problem. Repair Database makes no difference.
 
J

John Vinson

One table is assets; the other is depreciation. I don't need depreciation
so want to delete it; have deleted all the fields dealing with depreciation
on the Assets table. AssetID is what is tied to Asset ID on Depreciation,
which is the problem. Repair Database makes no difference.

Try deleting the relationship programmatically:

Sub KillRelations()
Dim db As DAO.Database
Dim rel As Relation
Dim inti As Integer
Set db = DBEngine(0)(0)
For inti = db.Relations.Count - 1 To 0 Step -1
Set rel = db.Relations(inti)
If rel.Table = "Assets" And rel.ForeignTable = "Depreciation" Then
db.Relations.Delete rel.Name
End If
Next inti
End Sub

Or, you may have an irretrievably corrupted database. You might want
to create a new database and import everything except the Depreciation
table.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top