Todd MacPherson
asked on
How do I remove links to dbf tables only and ignore the rest of the linked tables?
I have some code that drops all of the linked tables but I do not know how to alter it to only drop linked dbf tables while still maintaining a link to all of my back end access tables.
Please help
For Each tDef In CurrentDb.TableDefs
If CBool(Len(tDef.Connect)) Then
Debug.Print "Dropping linked Table: "; tDef.Name
CurrentDb.Execute "DROP TABLE [" & tDef.Name & "]"
End If
Next
Thanks PBLack
Please help
For Each tDef In CurrentDb.TableDefs
If CBool(Len(tDef.Connect)) Then
Debug.Print "Dropping linked Table: "; tDef.Name
CurrentDb.Execute "DROP TABLE [" & tDef.Name & "]"
End If
Next
Thanks PBLack
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. That did the trick. I rarely work with dbf's and hope to keep it that way!
".dbf" should be found in any DSN-less connections, otherwise there should be some other tell tale text that identifies linked tables you want to remove. If needed, you can subsitute 'other' text for .dbf in the Instr function in the code I posted.
Standard connection strings can be found here:
http://www.dofactory.com/Connect/Connect.aspx#_self705