All,
Is there a way that I can ask if a Table is Linked or Resident in a Database.
I would like to use the follow code without Defining which table not to include?
Where I have 'Client' I would like to just skip the resident tables regardless of name.
Cheers,
Is there a way that I can ask if a Table is Linked or Resident in a Database.
I would like to use the follow code without Defining which table not to include?
Code:
Public Sub LinkTables(strP As String)
Dim vItem As Variant
Dim strTable As String
For Each vItem In CurrentDb.TableDefs
If Left(vItem.Name, 2) <> "MS" And Left(vItem.Name, 6) <> "Client" Then
DoCmd.DeleteObject acTable, vItem.Name
DoCmd.TransferDatabase acLink, "Microsoft Access", _
strP, acTable, vItem.Name, _
vItem.Name
End If
Next
End Sub
Where I have 'Client' I would like to just skip the resident tables regardless of name.
Cheers,