Gates Is Antichrist
Well-known Member
- Joined
- Aug 15, 2002
- Messages
- 1,961
I wish to change what a linked table refers to in code. I figured it would be something like
Sub foo(sWhoToPointTo as String)
Dim db As Database, rs As Recordset, tdf As TableDef
Set db = CurrentDb
Set tdf = db.OpenRecordset("LinkAlias") 'I gather that it's dbOpenDynaset type
'need I also dynaset the "linkee" sWhoToPointTo now?
'And what now? Here is where I want to "re-link." I also want it to be permanent.
Set tdf = Nothing
Set db = Nothing
End Sub
TIA
Sub foo(sWhoToPointTo as String)
Dim db As Database, rs As Recordset, tdf As TableDef
Set db = CurrentDb
Set tdf = db.OpenRecordset("LinkAlias") 'I gather that it's dbOpenDynaset type
'need I also dynaset the "linkee" sWhoToPointTo now?
'And what now? Here is where I want to "re-link." I also want it to be permanent.
Set tdf = Nothing
Set db = Nothing
End Sub
TIA