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 ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / November 2005

Tip: Looking for answers? Try searching our database.

User Level Security

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MS learner - 23 Nov 2005 19:30 GMT
I had set up a user level security with a couple of admins and a few users. I
did this setup on my system, the database is on the shared network drive.
When I opened the application in my system, it prompted and recorded the
Current User and passwords accurately. However, when I opened it from any
other system, it opened directly without prompting for a User Login. I am
assuming this is because the System .mdw file was created in my C drive.
Could anyone tell me how do I set the security up such that the workgroup
information is for everyone who accesses this database from the shared
network drive.

Thanks for any suggestions.

Conrad - 23 Nov 2005 20:12 GMT
Was this Access 2003 or 97?  If it's 2003 just use the wizard.  It actually
works quite well and does most of the work for you.  Just place the database
where you need it and start the wizard.

If it's 97 see Access 97 Developer's Handbook pg 311

> I had set up a user level security with a couple of admins and a few users. I
> did this setup on my system, the database is on the shared network drive.
[quoted text clipped - 8 lines]
> Thanks for any suggestions.
>  
Keith W - 24 Nov 2005 08:44 GMT
>I had set up a user level security with a couple of admins and a few users.
>I
[quoted text clipped - 8 lines]
>
> Thanks for any suggestions.

You should *not* be changing the default "system.mdw" but creating your own
workgroup information file (WIF), eg "secure.mdw". The WIF should be stored
on a server where all your users can see it and they would join it on a
session-by-session basis using the "/wrkgrp" switch in a shortcut command
line.  However, if users can still open your app from a browser without
entering logon details then you have missed at least one step in securing
the app.

Essential reading before attempting to secure an Access file is the MS FAQ
on the subject.  There's a link to it on my website along with my
step-by-step example.  Be sure you read and understand the FAQ before you
try to secure your app - experiment on dummy files first.

Good luck.
Keith.
www.keithwilby.com
MS learner - 25 Nov 2005 16:10 GMT
Thank you for the link. I did realize that I should not be setting up a
system.mdw because when I did that even other Access applications had to be
opened with the user name and passwords in the mdw file.

I have put this database on the server and I had split it after that. Now
does it matter where I run the User Level Security wizard from (the server or
my own system?). Moreover, the purpose of having this user sign in is just
for merely tracking the user inputs in case of a question regarding the data
entered. So it does not have to be a very tight security.

I was not too clear about the "they would join it on a
> session-by-session basis using the "/wrkgrp" switch in a shortcut command
> line. ". Please could you further help me out with that?

Also, this is Access 2000.

Thanks once again.

> >I had set up a user level security with a couple of admins and a few users.
> >I
[quoted text clipped - 25 lines]
> Keith.
> www.keithwilby.com 
Conrad - 28 Nov 2005 14:35 GMT
If you are strictly looking for the user entering data and not security, an
easier method might be this -
(put this code in a module)
***

Private S1 As String
Private Declare Function WNetGetUser Lib "mpr.dll" Alias "WNetGetUserA"
(ByVal lpName As String, ByVal lpUserName As String, lpnLength As Long) As
Long

Public Function FindUserName() As String
' Function that returns the name of the currently logged on user
' Example - MyString = FindUserName
S1 = Space(512)
GetUserName S1, Len(S1)
FindUserName = Trim$(S1)
FindUserName = Left(FindUserName, Len(FindUserName) - 1)

End Function

****

I received this code from a newsgroup years ago.  Don't know who posted it.  
They never signed it.  Hope this helps you out.

> Thank you for the link. I did realize that I should not be setting up a
> system.mdw because when I did that even other Access applications had to be
[quoted text clipped - 43 lines]
> > Keith.
> > www.keithwilby.com 
MS learner - 29 Nov 2005 14:49 GMT
Will this be pulling the user name from the network login? Could you tell me
how this would be working? Thank you very much for your patience and help.

> If you are strictly looking for the user entering data and not security, an
> easier method might be this -
[quoted text clipped - 68 lines]
> > > Keith.
> > > www.keithwilby.com 
Conrad - 29 Nov 2005 14:57 GMT
Yes this will pull the network login.  Now that you mention it I was assuming
that the users would be logging into a network and that it was not a shared
pc.  If my assumptions were incorrect then the code won't work in this
situation and my appoligies.  But if my assumptions were correct then the
code below would work well.  Also you won't have to support a security file
and it will be ready to go for anyone logged in.

Hope this helps.

> Will this be pulling the user name from the network login? Could you tell me
> how this would be working? Thank you very much for your patience and help.
[quoted text clipped - 71 lines]
> > > > Keith.
> > > > www.keithwilby.com 
MS learner - 29 Nov 2005 19:08 GMT
Thank you very much for the code. I tried the code but an error appears
stating that the method GetUserName S1, Len(S1) has not been defined.
I really appreciate all your help and yes we do have a network login and I
think that would be perfect instead of having an access security.

> Yes this will pull the network login.  Now that you mention it I was assuming
> that the users would be logging into a network and that it was not a shared
[quoted text clipped - 80 lines]
> > > > > Keith.
> > > > > www.keithwilby.com 
MS learner - 29 Nov 2005 19:32 GMT
It works well now. Thank you very much. I am really relieved to get this
small but important issue out of the way. Once again, thanks.

> Yes this will pull the network login.  Now that you mention it I was assuming
> that the users would be logging into a network and that it was not a shared
[quoted text clipped - 80 lines]
> > > > > Keith.
> > > > > www.keithwilby.com 
Conrad - 30 Nov 2005 13:18 GMT
Glad that it works.

> It works well now. Thank you very much. I am really relieved to get this
> small but important issue out of the way. Once again, thanks.
[quoted text clipped - 83 lines]
> > > > > > Keith.
> > > > > > www.keithwilby.com 
 
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



©2008 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.