Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-07-2011, 08:31 AM   #1
therpgmaker
Newly Registered User
 
Join Date: Jun 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
therpgmaker is on a distinguished road
Registering New Users in VBA

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?

therpgmaker is offline   Reply With Quote
Old 06-08-2011, 12:41 AM   #2
JamesMcS
Keyboard-Chair Interface
 
JamesMcS's Avatar
 
Join Date: Sep 2009
Location: Northamptonshire, UK
Posts: 1,819
Thanks: 14
Thanked 47 Times in 46 Posts
JamesMcS will become famous soon enough
Re: Registering New Users in VBA

So there's a users table in the database? Has that got thr right permissions, as well as the form?
__________________
Cheers

James
If someone's helped you out, don't forget to click on the scales icon in one of their posts and add to their rep.
JamesMcS is offline   Reply With Quote
Old 06-08-2011, 08:02 AM   #3
therpgmaker
Newly Registered User
 
Join Date: Jun 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
therpgmaker is on a distinguished road
Re: Registering New Users in VBA

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.

therpgmaker is offline   Reply With Quote
Old 06-08-2011, 08:50 AM   #4
Thales750
Formerly Jsanders
 
Join Date: Dec 2007
Location: Galveston, Texas
Posts: 1,611
Thanks: 40
Thanked 28 Times in 28 Posts
Thales750 is on a distinguished road
Re: Registering New Users in VBA

Quote:
Originally Posted by therpgmaker View Post
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.
__________________
Aboard Oceans Eleven on Offatts Bayou
inveniemus viam aut faciemus
Thales750 is offline   Reply With Quote
Old 06-08-2011, 09:33 AM   #5
gemma-the-husky
Super Moderator
 
gemma-the-husky's Avatar
 
Join Date: Sep 2006
Location: UK
Posts: 13,460
Thanks: 51
Thanked 949 Times in 918 Posts
gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all gemma-the-husky is a name known to all
Re: Registering New Users in VBA

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.
__________________
Dave (Male!)
Gemma was my dog

if a poster helps you, please click the scales at the top right of this posting, or use the thanks button alongside.
gemma-the-husky is offline   Reply With Quote
Old 06-08-2011, 11:24 AM   #6
therpgmaker
Newly Registered User
 
Join Date: Jun 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
therpgmaker is on a distinguished road
Re: Registering New Users in VBA

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.

therpgmaker is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Registering MSCOMCTL2.ocx TKnight Modules & VBA 0 05-27-2009 09:06 AM
Using a DLL without registering it NPhillips Modules & VBA 0 03-18-2008 10:55 AM
Web Hosting and Domain Registering NightPort General 3 06-01-2004 09:26 AM
Registering ActiveX rube Modules & VBA 0 07-19-2003 05:51 PM
Registering Libraries sush Modules & VBA 1 06-16-2000 07:32 AM




All times are GMT -8. The time now is 10:40 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World