Unanswered: Auto login to SQL Server from Access VBA?
Everytime I run a particular piece of code, it will ask me for the MS SQL connection information. Although I already have a SQL ODBC connection, it wants me to select the connection, then enter in the SQL password.
I want to know how to automate this or put it into my MS Access VBA code?
Again, it depends on the code! That's just a teeny snippet and , I suspect, is a lot more than "all i have so far".
My best guess at piecing this together is that you are executing a pass through query. If so then the cnn (I assume that is an ADODB connection object) is totally redundant. The connection string is part of the query definition.