I currently am storing the user's ID and Password for an ODBC connection in a table. I reference the User info and the connection works fine. Here is my dilemma...We have to reset our passwords every so often and if the user forgets to update their password in my database they will get the ODBC login prompt. I don't want this. I want to throw a simple error message if they have not updated their password, or the password does not work for the ODBC connection. Any tips on how to test? Currently to set up the ODBC I am deleting and re-linking the tables (see below code). Thanks in advance.
Code:
DoCmd.DeleteObject acTable, "TableName"
DoCmd.TransferDatabase acLink, "ODBC Database", _
"ODBC;DSN=[Connection];UID=" & strFDOPRD & ";PWD=" & strFDOPRDPass & ";" _
& "DATABASE=pubs", acTable, "TableName", "TableName"