Is there a better way to do this...I have a bunch of db's that have linked tables, we will be password protecting these linked db's with possibility of any 1 of 4 different passwords. My thought is coded below>>>if password 1 errors 'incorrect password' try password 2....etc
Do
tbl.Properties("Jet OLEDB:Link Provider String") _
= "MS Access;Pwd=" & pass
Debug.Print pass
Debug.Print Err.Description
Select Case pass
Case "rt"
pass = "funds"
Case "funds"
pass = "Reports"
Case "reports"
pass = "mike"
End Select
Loop Until Err.Number <> -2147467259
This code still errors out even though the last password is correct. I've stepped through it and the password gets assigned....but returns the same error??
Do
tbl.Properties("Jet OLEDB:Link Provider String") _
= "MS Access;Pwd=" & pass
Debug.Print pass
Debug.Print Err.Description
Select Case pass
Case "rt"
pass = "funds"
Case "funds"
pass = "Reports"
Case "reports"
pass = "mike"
End Select
Loop Until Err.Number <> -2147467259
This code still errors out even though the last password is correct. I've stepped through it and the password gets assigned....but returns the same error??