Connecting to DSN from MS Access 2010

I have a system DSN set up and working. My VBA looks like: Dim cn As New ADODB.Connection cn.Open "DSN=test;Uid=myID;Pwd=myPwd"

And I'm getting the error: "[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "MyDB" requested by the login. The login failed."

Any help would be appreciated.

0 answers