On Tue, 10 Jun 2008 08:20:02 -0700, Confused of Paddington <Confused of
Table has 1 field which is the primary key. Have deleted all joins in the
relationships window. Just attempting to increase the field length. Message
says table is still part of one or more relationships.
Using Access 2000.
Just be aware that the relationships window isn't all that intuitive. If you
deleted the relationship by selecting and deleting the table icons, all you
did was hide those tables.
Select the "Show All Relationships" tool on the toolbar, and then select each
*join line* - not the table at the end of the line, but the line itself - and
delete it.
If (as can happen) there are hidden relationships, you can use this small
tactical nuclear device to destroy them all: copy and paste the following
routine into a new Module; save it as basRelationships; and type
Call KillAllRelations
in the Immediate window.
Compact the database after making your table changes, and then reestablish
relationships and compact again.
BE SURE TO BACK UP YOUR DATABASE FIRST!!!!
Sub KillAllRelations()
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)
Debug.Print "Deleting relation "; rel.Name, rel.Table, rel.ForeignTable
db.Relations.Delete rel.Name
Next inti
End Sub