Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 11th, 2006, 10:30 AM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Permissions on DB without user-level security

Hi,

Is it possible to set permissions on a MDB file without using the user-level security?

I'm working on a project and it will be copied on many computers on the field (No network connection). I want to protect the structure and other things from the coordinator who will only enter the data into the database. If I use user-level security, the DB cannot be opened on foreign computers.

By example:
When the user open the MDB file a form appears and ask for the login and password.
Depending on the user group, permissions are granted for a number of objects.

Is it possible to program that in VBA?

Thank you

Nick

Reply With Quote
  #2 (permalink)  
Old May 11th, 2006, 11:50 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Yes, I do this a lot with contracted solutions. The idea is that in VBA, it is "Lite" security since it can be hacked pretty easy.

Create a table with Groups. Then create a table with usernames, passwords and whatever information for the user, and a GroupID FK. This is your access structure.

Be sure to hide menus when the database is opened.

The first form is modal/pop up, and asks for login credentials. Use Password formatting for the password field on the form and in the table. This form then checks the tables for proper authentication matches, and then opens a hidden form with username and group.

All the rest of your forms should refer to the hidden forms for proper access. What I do is segregate functions on seperate forms, and then unhide linking buttons based on the user's group credentials.

For each of your events, you have the option of going out and checking the group on the form, like this:

If [Forms]![frmHIDDENLogin].[Groups] = "Administrator" Then
   DoCmd.OpenReport 'etc
   Else
   MsgBox "You do not have access to this report." & vbCrLf & _
          "Please see the database Administrator for access."
End If

That sort of thing.

If [Forms]![frmHIDDENLogin].[Groups] = "Administrator" Then
   Me.btnAdminForm.Visible = True
   Else
   Me.btnAdminForm.Visible = False
End If

Is this helpful?



mmcdonal
Reply With Quote
  #3 (permalink)  
Old May 31st, 2008, 08:36 AM
Registered User
 
Join Date: May 2008
Location: Garner, NC, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is a little helpful to what I am doing, but I have a little different way that I want to use it. I want for the users to be able to login and use the switchboard. I want to have different switchboards based upon access. I also want them to be able to change their password. I am new at VBA programming and am having trouble setting up the queries. Can this be done? is there anyone who can help me through this programming?

Dean J. Crawn
Reply With Quote
  #4 (permalink)  
Old June 2nd, 2008, 06:53 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Yes it can be done. I would not use the built-in switchboard though.

You can also allow your users to change their passwords. Just give them the proper form and pre-populate the Username field based on their actual login identity (if that is feasible.) Then have them type their current password, and then type the new password twice, etc.

Can you work with forms without using the Switchboard wizard?

mmcdonal

Look it up at: http://wrox.books24x7.com
Reply With Quote
  #5 (permalink)  
Old June 7th, 2008, 08:09 AM
Registered User
 
Join Date: May 2008
Location: Garner, NC, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes I can, I just need help in setting up the menus so that I can limit access upon their login.

Dean J. Crawn
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Level Security cpbsmw Access 1 February 1st, 2007 08:41 AM
User Level Security cpbsmw Access 2 January 26th, 2007 04:07 PM
User-Level Security Wizard acting funny Bob Bedell Access 1 January 7th, 2006 02:53 AM
Security permissions of file eelisMX Pro VB.NET 2002/2003 0 October 4th, 2005 05:33 AM
Problem creating user-level security JackNimble Access 2 October 11th, 2004 11:20 AM



All times are GMT -4. The time now is 11:03 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.