Permissions Don't Seem to Be Working

G

Guest

I have a database (2002 - 2003) with user-level security. When I login to an
account that is a member of the Admins group, I am recognized as 'admin' by
the system, which is not the username I logged in with. I've embedded
"MsgBox Workspaces(0).UserName" in a VBA routine, and when executed displays
'admin' in the messagebox.

Furthermore, the remainder of the code in the routine will not execute,
erroring with "You do not have the necessary permissions to use the '___'
object." The object being a table.

I am extremely confused about what's going on here.

Can someone help?

Regards,

VBA Dabbler
 
J

Joan Wild

When you login, what is the username you are using?

Hit ctrl-g and type
?currentuser()
what does it return? also type
?dbengine.systemdb
what does it return?
 
G

Guest

This was apparently intermittent - it's not doing it now.

To answer your first question, I logged on with an account that is a member
of the 'Admins' group, not the 'Admin' account.

Now 'Currentuser' returns the username I logged on with, and
'dbengine.systemdb' returns an error (Microsoft Visual Basic - Compile error:
Invalid use of property).

One thing I did do after my original posting was revise my code from using
"Workspaces(0).UserName" to "DBEngine.Workspaces(0).UserName". This seemed
to clear up the issue, although I'm not sure that was the culprit.
 

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