G
Guest
I have created a link to a Dbase file in an Access 2000 database.
Periodically, the Dbase file data will change, but the structure will remain
the same. The path and/or filename could change, however. I would like to
be able to adjust the link to point to the new Dbase file when necessary.
I have used VB to update links to tables in other Access databases. Using
that as a basis, I created the following statements:
CurrentDb.TableDefs("DBLink").Connect = _
"dBase IV;HDR=NO;IMEX=2;DATABASE=D:\work\"
CurrentDb.TableDefs("DBLink").SourceTableName = "test.dbf"
CurrentDb.TableDefs("DBLink").RefreshLink
The Connect statement appears to execute, but the SourceTableName statement
generates an errorabout not being able to set the property once the object is
part of a collection. Because of that, I am not certain that the Connect
statment is actually working, even though it executes.
Is it possible to change this DBase link? I would prefer not to have to
remove the link and recreate it each time the DBase file changes.
Thanks.
Periodically, the Dbase file data will change, but the structure will remain
the same. The path and/or filename could change, however. I would like to
be able to adjust the link to point to the new Dbase file when necessary.
I have used VB to update links to tables in other Access databases. Using
that as a basis, I created the following statements:
CurrentDb.TableDefs("DBLink").Connect = _
"dBase IV;HDR=NO;IMEX=2;DATABASE=D:\work\"
CurrentDb.TableDefs("DBLink").SourceTableName = "test.dbf"
CurrentDb.TableDefs("DBLink").RefreshLink
The Connect statement appears to execute, but the SourceTableName statement
generates an errorabout not being able to set the property once the object is
part of a collection. Because of that, I am not certain that the Connect
statment is actually working, even though it executes.
Is it possible to change this DBase link? I would prefer not to have to
remove the link and recreate it each time the DBase file changes.
Thanks.