Relinking ODBC Tables

  • Thread starter Thread starter Brenda
  • Start date Start date
B

Brenda

I have an access 97 database and in that database is a
table that is located on a sql server.

I want to create a button that allows the user to relink
the table automatically.

What is the vba code that I need to do this ????

Thanks in advance
 
Brenda said:
I have an access 97 database and in that database is a
table that is located on a sql server.

I want to create a button that allows the user to relink
the table automatically.

What is the vba code that I need to do this ????

Thanks in advance

Cut from my project:

DoCmd.TransferDatabase acLink, "ODBC-database",
"ODBC;DSN=EMG;UID=;PWD=;APP=Microsoft®
Access;WSID=;LANGUAGE=us_english;DATABASE=" & cSrc & ";TABLE=dbo." &
rs!tabel, acTable, rs!tabel, "dbo_" & rs!tabel

EMG is the name of the DSN. Supply yours.

rs!tabel is a field in an open recordset that contains a table name (the
word tabel is Dutch for table)

HTH
 
Back
Top