Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linking Access Tables using VB
Message
From
29/05/2001 15:03:19
 
 
To
29/05/2001 13:26:06
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00512304
Message ID:
00512358
Views:
16
>I'm looking for a way to relink an access table using vb. I have it working in Access using the DoCmd.TransferDatabase. Does anyone have a way to do this?
>
>The reason I need to be able to do this is that I make modifications in an mdb that links to tables in either a Test database or the live database. I need a way to switch between them through VB code so that when a user logs on based on a registry entry it will relink to either the live data or production.
>
>Any help would be greatly appreciated.
>
>Nichole Brelje

If the links exist already, you can change table links by using the tabledefs collection:
thisdb.TableDefs(0).Connect = "FoxPro 2.6;DATABASE=" & strNewConn
thisdb.TableDefs(0).RefreshLink
thisdb.TableDefs.Refresh
Where thisdb refers to the opened MDB database and strNewConn has the path to the new source.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform