ColeChaW
Charlie
- Local time
- Yesterday, 22:52
- Joined
- Aug 10, 2006
- Messages
- 36
I'm trying to change linked tables from pointing to a SQL server database to pointing to a local copy when offline.
I cannot figure out how to change the tabledef.attributes tag. I need to switch it between dbAttachedODBC and dbAttachedTable, I think.
Is this possible or should I do something else???
Thanks.
I cannot figure out how to change the tabledef.attributes tag. I need to switch it between dbAttachedODBC and dbAttachedTable, I think.

Code:
For Each TBDef In CurDB.TableDefs
Set tdfLinked = CurDB.TableDefs(TBDef.Name)
If SetOnline Then
tdfLinked.Attributes = tdfLinked.Attributes Or dbAttachedODBC
Else
tdfLinked.Attributes = (tdfLinked.Attributes And Not dbAttachedODBC) 'dbAttachedTable
End If
tdfLinked.Connect = DBPath
tdfLinked.RefreshLink
Next TBDef
Is this possible or should I do something else???
Thanks.
