Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Security / July 2007

Tip: Looking for answers? Try searching our database.

security without login

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
deb - 03 Jul 2007 15:56 GMT
I need to secure my database without having a login form.

I have about 50 users and need 3 types of access.  read only, read/edit/add
new, and Admin/Full.

As the user opens the DB it checks the current user name against the tblUser
and allows access if the user exists in the table.  I does not prompt for
login or password.  If user does not exist, it displays msg to request DB
permissions from DB Admin.

Does anyone have the code for this?  I am a bit lacking in the coding
department!!

Thanks in advance!!
Signature

deb

Douglas J. Steele - 03 Jul 2007 22:11 GMT
You do realize that that won't provide any security at all, I hope.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I need to secure my database without having a login form.
>
[quoted text clipped - 12 lines]
>
> Thanks in advance!!
Scott McDaniel - 03 Jul 2007 23:25 GMT
>I need to secure my database without having a login form.
>
[quoted text clipped - 8 lines]
>Does anyone have the code for this?  I am a bit lacking in the coding
>department!!

As Doug said: This is absolutely NO security at all ...  but ...

Dim rst As ADODB.Recordset

Set rst = New ADODB.Recordset
rst.Open "SELECT * FROM tblUsers WHERE strUserName='" & YourCurrentUser & "'", CurrentProject.Connection

If (rst.EOF and rst.BOF) Then
    MsgBox "You don't have permission to open this database. Contact the Adminstrator for assistance", vbOkOnly
    Application.Quit
End If   

Anyone could still simply link to the database from another Access database, open tblUsers, and add themselves to the
table ...

>Thanks in advance!!

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
david@epsomdotcomdotau - 05 Jul 2007 13:45 GMT
The easiest place to get the current user from is the command
line. Create a short cut to msaccess.exe, something like this:

"c:\program files\...\msaccess.exe" "c:\my.mdb" /user=%user%
/wrkgrp="m:\my.mdw"

Add all the users to a workgroup file, using there login name,
the same as you see if you type
   Set
at the dos prompt (open a command window).

Add three groups to the workgroup file, r, rw, af.
Add each of the new users to the appropriate group.

(david)

> I need to secure my database without having a login form.
>
[quoted text clipped - 10 lines]
>
> Thanks in advance!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.