Public mcnn As ADODB.Connection
Private dbs As ADODB.Recordset
Set mcnn = New ADODB.Connection
mcnn.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = \\locationofdatabase\nameofdb.mdb"
mcnn.Open
Set dbs = New ADODB.Recordset
dbs.CursorType = adOpenKeyset
dbs.LockType = adLockOptimistic
dbs.Source = "SELECT * FROM (nameofreport)"
Set dbs.ActiveConnection = mcnn
dbs.Open
whatever you want to do with it
dbs.close
____
Joe
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.