User must relink tables each time Access 2000 database is opened

  • Thread starter Thread starter Keith Saby
  • Start date Start date
K

Keith Saby

Hello,

I have a user running Windows XP ( upgraded from Windows
NT ) and Access 2000. Each time he opens his *.mdb file,
he must relink his linked tables. Access is not saving
the remote table links.

Steps used to link table:
=========================
New ( Table )
Link Table
ODBC Databases
Machine Data Source

Thanks for any suggestions you can provide.

Keith
 
Hi Keith:

To reconnect to an ODBC database through code, check out the book "ADO
Programming for Dummies", starting at pg 40... it will all depend on whether
or not you need to establish a DSN connection. Here's the code sample for a
connection to an ODBC source without a DSN connection:

Sub DSNLess()

Dim cnt As New ADODB.Connection

cnt.Open "DRIVER = Microsoft Access Driver (*.mdb);" & "DBQ = C:\Your
Directory\yourdatabase.mdb;"

MsgBox cnt.state

End Sub

or

Sub DSNLessSQL()

Dim cnt As New ADODB.Connection

cnt.Open "DRIVER = {SQL Server};" & "SERVER = rkpntsr2; UID=sa; PWD= ;
DATABASE = pbs"

MsgBox cnt.state

End Sub

There are functions that connect using a DSN; there are functions to create
a DSN. Good luck!

Regards,

Al
 
Al,

Thanks for taking the time to respond to my problem.
Unfortunately I'm not using code to connect to Access.

My user is linking tables inside of Access, exiting Access,
starting Access once again only to find that the tables
linked to a remote database before are no longer linked.

Keith
 
Back
Top