Registering New Users in VBA (1 Viewer)

therpgmaker

New member
Local time
Yesterday, 22:38
Joined
Jun 7, 2011
Messages
3
I'm using MS Access 2003, and I set up user level security for the database. I set up a form that certain users with the correct permissions can see that allows them to register new users for the database. The form works fine when I use it, but if I try to use it through any other account, it gives me an error saying I don't have permission to view the 'Tables' object. I don't want to give these users full admin permission over the database, but is there a way I can allow them to add new user accounts through this form?
 

JamesMcS

Keyboard-Chair Interface
Local time
Today, 05:38
Joined
Sep 7, 2009
Messages
1,819
So there's a users table in the database? Has that got thr right permissions, as well as the form?
 

therpgmaker

New member
Local time
Yesterday, 22:38
Joined
Jun 7, 2011
Messages
3
No, there's no users table in the database, I'm trying to directly add users to the User Level Security. I tried giving him permissions for everything, but it looks as if I'm the only user who can add new users.
 

Thales750

Formerly Jsanders
Local time
Today, 00:38
Joined
Dec 20, 2007
Messages
2,093
No, there's no users table in the database, I'm trying to directly add users to the User Level Security. I tried giving him permissions for everything, but it looks as if I'm the only user who can add new users.


It might be prudent to design a user security scheme from scratch. If you have the time and resources.

In 2007 and later the built-in one is no longer supported.

And even in 2003 you must accept the built in functions. You are going to need the user list for many functions separate from just login security.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 05:38
Joined
Sep 12, 2006
Messages
15,641
if a user doesn't have adimn privileges to rights database (ie the mdw files) he won't be able to change other users. They can change their own passwords etc, but not other peoples.

You can't have it both ways. Any user who can manage the mdw file for other users has to be "god" if you like, and can change anything for anyone.

I think that is right. You might be able to manipulate the rights database programmatically with DAO, and assign temporary privileges in code - but I am not sure how far you can go, and it's probably more work than you want.

O'Reilly do a very thorough book on DAO with a lot of this stuff in it.
DAO Object Model (Helen Feddema). Basically there are Users and Groups collections of objects, that store all this stuff.
 

therpgmaker

New member
Local time
Yesterday, 22:38
Joined
Jun 7, 2011
Messages
3
Well I figured out a work-around. I open a connection referencing the .mdw file, using my username and password, and can use that to have a new user registered. I don't like having my password in the code there, but at least it can't be seen in the .mde file.
 

Users who are viewing this thread

Top Bottom