Question : table link

My VBA Access code isn't able to change the properties for the ODBC linked access table.
I'm trying to update my ODBC linked tables w/ a new password, so that I don't have to relink them.
Can you help?
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
Function MC_LINK_TABLE_MANAGER()
On Error GoTo MC_LINK_TABLE_MANAGER_Err
Dim PASSWORD_TEXT As String
Dim CONNECT_STRING As String
Dim CONNECT_CHECK As String
PASSWORD_TEXT = InputBox("Enter new password:", "PASSWORD RESETTER")
 
CONNECT_STRING = "ODBC;DSN=PRD;UID=Dfunkt;PWD=" & PASSWORD_TEXT & ";DATABASE=PRD; AUTHENTICATION=;AUTHENTICATONPARAMETER=;"
 
CurrentDb().TableDefs("COMPANY").Properties("CONNECT") = CONNECT_STRING
 
CONNECT_CHECK = CurrentDb().TableDefs("COMPANY").Properties("CONNECT")
 
MC_LINK_TABLE_MANAGER_Exit:
    Exit Function
 
MC_LINK_TABLE_MANAGER_Err:
    MsgBox Error$
    Resume MC_LINK_TABLE_MANAGER_Exit
 
End Function

Answer : table link

Have you seen this:

http://www.mvps.org/access/tables/tbl0010.htm

It's somewhat detailed, but you might be able review this and determine exactly what you are missing. FWIW, I've always deleted and recreated links when needed instead of trying to alter them. Many of the TableDef properties are readonly, and some can be readonly in certain situations while read/write in others ...
Random Solutions  
 
programming4us programming4us