reconnect linked table with different user

S

Steve

Is it possible to reconnect a linked table to an ODBC connection yet change the user that is linked to it? I have attached the code that I am currently using to relink the tables. It seems like I should be able to change the User in the connect statement but it doesn't seem to work. Does anyone have any ideas?

UID=CaseMgtRW become UID=CaseMgtR

****Begin code extract***
Dim dbsCurrent As Databas
Dim tdfLinked As TableDe

Set dbsCurrent = CurrentD
Set tdfLinked = dbsCurrent.CreateTableDef(Table_Name
tdfLinked.Connect = "ODBC;DATABASE=UTILCaseMGT;UID=CaseMgtRW;PWD=;DSN=Util-CaseManage
tdfLinked.SourceTableName = Table_Nam
If Exist_Table(Table_Name) The
dbsCurrent.TableDefs.Delete tdfLinked.Nam
End I
dbsCurrent.TableDefs.Append tdfLinke
tdfLinked.RefreshLin
****End code extract***
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top