Admin access denied

  • Thread starter Thread starter RipperT
  • Start date Start date
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
 
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
 
Back
Top