T
Terry
I have an old Access database with tables linked through
ODBC. The database access is linked to has moved. How do I
modify the connection string information for the linked
tables?
I found the function below on MS knowledge base. Calling
the function with one of my table names I stopped once tbl
was set and viewed tbl.connect in VBA immediate window:
? TBL.Connect
ODBC;DSN=D122;SRVR=d122.knu.mycompany.com;UID=terry;DATABAS
E=
I think all I need to do is change d122 to another DSN.
How would I do that (permanently)?
Thanks,
Terry
Function DoesTblExist(strTblName As String) As Boolean
On Error Resume Next
Dim db As DAO.Database, tbl As DAO.TableDef
Set db = CurrentDb
Set tbl = db.TableDefs(strTblName)
If Err.Number = 3265 Then ' Item not found.
DoesTblExist = False
Exit Function
End If
DoesTblExist = True
End Function
ODBC. The database access is linked to has moved. How do I
modify the connection string information for the linked
tables?
I found the function below on MS knowledge base. Calling
the function with one of my table names I stopped once tbl
was set and viewed tbl.connect in VBA immediate window:
? TBL.Connect
ODBC;DSN=D122;SRVR=d122.knu.mycompany.com;UID=terry;DATABAS
E=
I think all I need to do is change d122 to another DSN.
How would I do that (permanently)?
Thanks,
Terry
Function DoesTblExist(strTblName As String) As Boolean
On Error Resume Next
Dim db As DAO.Database, tbl As DAO.TableDef
Set db = CurrentDb
Set tbl = db.TableDefs(strTblName)
If Err.Number = 3265 Then ' Item not found.
DoesTblExist = False
Exit Function
End If
DoesTblExist = True
End Function