Removing a field

C

C Tate

I have to remove a field from one of the tables in my database. Access is
telling me 'You can't delete the field. It is part of one or more
relationships. Delete the relationships from the relationships window first.'

Now, I deleted all the relationships leading to the table whose field I wish
to delete. However, Access keeps repeating the same message.

What can I do to get rid of this field?
 
A

Allen Browne

Try listing the relationships programmatically, to see if there is still a
hidden one:

Public Function ShowRel()
Dim db As DAO.Database
Dim rel As DAO.Relation
Dim fld As DAO.Field

Set db = CurrentDb()
For Each rel In db.Relations
Debug.Print rel.Name, rel.Table, rel.ForeignTable,
RelationAttributes(rel.Attributes)
For Each fld In rel.Fields
Debug.Print , fld.Name, fld.ForeignName
Next
Next

Set fld = Nothing
Set rel = Nothing
Set db = Nothing
End Function
 
K

KARL DEWEY

In the Relationalship window click on Show All to see if there are more.
Check your queries also.
 

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

Similar Threads


Top