J
J_Goddard
I use the following code in an MS Access 2000 application, and it works fine:
Dim db As Database, rstControl As Recordset
Dim tblControl As TableDef
.... code snipped
CheckPoint = 0
'
' Loop to delete linked tables; tables are linked if the 'connect'
' property is not null
'
CheckPoint = 1
On Error Resume Next
'
' Don't generate an error if a table is not linked
'
For Each tblControl In db.TableDefs
If Not IsNull(tblControl.Connect) And Len(Trim(tblControl.Connect)) > 0
Then
DoCmd.DeleteObject acTable, tblControl.Name
End If
Next
CheckPoint = 2
When I ran this in Access 2003, the For Each tblcontrol line generated an
error loading dll message.
Of course, it did not say *which* dll was causing the problem.
The code compiles fine in Access 2003; might the problem be in the references?
Thanks
John
Dim db As Database, rstControl As Recordset
Dim tblControl As TableDef
.... code snipped
CheckPoint = 0
'
' Loop to delete linked tables; tables are linked if the 'connect'
' property is not null
'
CheckPoint = 1
On Error Resume Next
'
' Don't generate an error if a table is not linked
'
For Each tblControl In db.TableDefs
If Not IsNull(tblControl.Connect) And Len(Trim(tblControl.Connect)) > 0
Then
DoCmd.DeleteObject acTable, tblControl.Name
End If
Next
CheckPoint = 2
When I ran this in Access 2003, the For Each tblcontrol line generated an
error loading dll message.
Of course, it did not say *which* dll was causing the problem.
The code compiles fine in Access 2003; might the problem be in the references?
Thanks
John