User must relink tables each time Access 2000 database is opened

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
 
A

Al Borges

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
 
K

keith.saby

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
 

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