Access Db Password Protected
Opening Access Database Using ADO
Dim DSN As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Dim strPath$
Dim Uid$, PW$
'Access Version
UId = "sa"
PW = "Password"
strPath = "d:\temp\test.mdb"
With DSN
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open strPath, Uid, PW
End With
SQL = "Select * From Table_Name"
Rs.Open SQL, DSN, adOpenDynamic, adLockOptimistic
You can do anything you want with this. I usually
make DSN Global to the whole project, you can then
use it anywhere.