Admin access denied

R

RipperT

I have a module in the front end of my split, secured DB that shows who
is logged into the DB at any given moment:

Sub ShowCurrentUsers()
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
cn.Provider = "Microsoft.jet.oledb.4.0"
cn.Open "Data Source=g:\MyDirectory\MyDatabase_BE.mdb"
cn2.Open "Provider=Microsoft.JET.OLEDB.4.0;" _
& "Data Source=g:\MyDirectory\MyDatabase_BE.mdb"

Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")

' Output the list of all users in the current database.

Debug.Print rs.Fields(0).Name, "", rs.Fields(1).Name, _
"", rs.Fields(2).Name, rs.Fields(3).Name

While Not rs.EOF
Debug.Print rs.Fields(0), rs.Fields(1), _
rs.Fields(2), rs.Fields(3)
rs.MoveNext
Wend
End Sub

I recently discovered that the default users group had Open/Run
permissions to the backend DB object, so I removed this
permission for the users group and guess what? The above code no longer
works. I type showcurrentusers in the immediate window and a runtime error
occurs saying "you
don't have permission to use the (path to BE) object. Have your system
administrator or person who created this object establish the
appropriate permissions for you." I have administer permissions and I
own everything in the front and back end. What gives?

Many thanx,

Ripper
 
R

RipperT

I've found that the Open command provides for the username and password
parameters, but when I insert them, I get:

"Cannot start your application. The workgroup information file is
missing or opened exclusively by another user."

Please help!

Rip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top