Inadvertently msgbox ADO joined the string to join the access connectionstring. So many choices were found. One by one analysis.
Standard Practices for connecting to access through ado
There are two ways to connect ADO data objects to a database: ODBC and ole db.
(1) Using OLE DB
**************************************** ****************
* ** Ole db provider for Microsoft Jet
**************************************** ****************
Dim oconn, strconn
Set oconn = server. Createobject ("ADODB. Connection ")
Strconn = "provider = Microsoft. Jet. oledb.4.0 ;"&_
"Data Source = C:/somepath/mydb. mdb ;"&_
"User ID = admin ;"&_
"Password = ;"
Oconn. Open strconn
**************************************** ****************
* ** Ole db provider for ODBC Databases
**************************************** ****************
Access the MS Access Database
Dim oconn, strconn
Set oconn = server. Createobject ("ADODB. Connection ")
Strconn = "provider = msdasql ;"&_
"Driver = {Microsoft Access Driver (*. mdb )};"&_
"DBQ = C:/somepath/mydb. mdb ;"&_
"Uid = myusername ;"&_
"Pwd = mypassword ;"
Oconn. Open strconn
(2) using ODBC
**************************************** ****************
* ** ODBC driver for access
**************************************** ****************
Dim oconn, strconn
Set oconn = server. Createobject ("ADODB. Connection ")
Strconn = "driver = {Microsoft Access Driver (*. mdb )};"&_
"DBQ =" & server. mappath ("testdb. mdb ");&_
"Uid = adminaccount ;"&_
"Pwd = password ;"
Oconn. Open strconn