Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CurrentDb().TableDefs("myTable").question 2

Status
Not open for further replies.

OhioSteve

MIS
Mar 12, 2002
1,352
US
I want to interact with the linked table manager programatically. I have a reference to DAO set. I know that the property used for linked table connections is~

CurrentDb().TableDefs([table name]).Connect

When I output that as a string, I get values like~
";DATABASE=C:\acme\sales.mdb"

I tried to set the property using this command~

CurrentDb().TableDefs("itemDetails").Connect= ";DATABASE=C:\acme\marketing.mdb"

That executes without an error, but it does NOT really change the source of the linked table. Please advise.

 
Try:
Code:
Dim db As Database
Set db = CurrentDb
strConnect = ";DATABASE=C:\acme\marketing.mdb"
db.TableDefs("itemDetails").Connect = strConnect
db.TableDefs("itemDetails").RefreshLink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top