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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Update Linked Tables 1

Status
Not open for further replies.

jt643

Technical User
Jun 17, 2003
144
Is there a way I can autoupdate or refresh my linked tables via VB or within Access so my users don't have to go through the 'Linked Table Manager' each time?
 
You don't normally have to do this unless the location has changed.
 
You can use DAO to link the tables as the application starts. I have a sub which links in a named table from a named database. Here's the core of it:
Code:
Set tdfLinked = gdbs.CreateTableDef(strTable)
tdfLinked.Connect = ";DATABASE=" & strDatabaseName
tdfLinked.SourceTableName = strTable
gdbs.TableDefs.Append tdfLinked
gdbs is a public holding the current database.

There's a similar sub which calls gdbs.TableDefs.Delete to unlink the tables before they are relinked.

Geoff Franklin
 
Perfect thanks to both of you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top