RE/
Do you have a sample of the code
that worked for you?
But remember - tjat was for .SubDataSheetName, not for the link....and
it hits *all* of the tables.
What you really want is to point to the TableDef in question and
then issue a Delete.
I did this in an Immediate window, and the link in question
did, indeed, go away:
--------------------------------------------------------------------
CurrentDB.TableDefs.delete("zstblAttachmentInfo")
--------------------------------------------------------------------
Your milage may vary....
For whatever reason... here's some.SubDataSheetName code
------------------------------------------------------------------
Public Sub SubDataSheetZap()
Dim thisDB As DAO.Database
Dim curTD As DAO.TableDef
Dim newProp As DAO.Property
Dim i As Long
Const myNone = "[None]"
Const newPropName = "SubDataSheetname"
Set thisDB = CurrentDb()
SysCmd acSysCmdInitMeter, "Zapping SubDataSheet Names...",
thisDB.TableDefs.Count
For i = 0 To thisDB.TableDefs.Count - 1
Set curTD = thisDB.TableDefs(i)
If tablePropExist(newPropName, curTD) Then
curTD.Properties(newPropName) = myNone
Else
Set newProp = curTD.CreateProperty(newPropName, dbText, myNone)
curTD.Properties.Append newProp
Set newProp = Nothing
End If
SysCmd acSysCmdUpdateMeter, i
Next i
SysCmd acSysCmdRemoveMeter
Set curTD = Nothing
Set newProp = Nothing
End Sub
Private Function tablePropExist(ByVal thePropName As String, ByRef theTD As
DAO.TableDef) As Boolean
Dim myProp As DAO.Property
On Error Resume Next
Set myProp = theTD.Properties(thePropName)
On Error GoTo 0
If Not myProp Is Nothing Then
tablePropExist = True
End If
End Function
------------------------------------------------------------------
--
PeteCresswell