Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security.....

Status
Not open for further replies.

katiekat

Technical User
Jun 6, 2000
300
US
Hi there,

I struggled most of yesterday to figure out how to set up security for my database. I tried the security wizard, and that was confusing and weird. I ended up just using Wrkgadm.exe, and folowing these Directions: thread181-84191 worked real well. But, these are my issues. The db in question is in a folder on a network, with it's MDW file. Security doesn't seem to be attached to this db, it pops up whenever I open Access, no matter what the database. Another issue: it only prompts when you first open access. If you open some other db, it prompts, and then you can close that and open any other database, as long as you don't close access.

I know I did something wrong, it doesn't seem like this should be the way that security works. Can anyone give me a little direction/explination here? I've read the Microsoft FAQ, I've searched around on the forums, and it's just not coming together for me at all. I'd appreciate some help.

Thanks very much!
Kate Holy tek-tips batman!:-0
 
I think perhaps my problem is that I renamed the default MDW file instead of creating a new one. So now access is using that for every DB. Do I have to reinstall access to get that back?

Is this a stupid question or something?

Thanks! Holy tek-tips batman!:-0
 
I recently tried to do the security thing too and password protected myself right out of access. Upon talking to my computer gurus here at work, I found out that reinstalling access was the only way around what I had done.

Not sure if you did the same thing.

Ellie
**Using Access 97**

lena.wood@wgint.com (work)
ellefant@bossig.com (home)
 
I can still open the database, no problem. My issue is that when I open a database, no matter which one, it prompts for the passwords that I set up (I thought) for the other DB. I was wondering if there was a way to get the original security file thing back; if I need to set up a new blank-ish file and name it system.mdw, or if I have to re-install access to get one that works right. Holy tek-tips batman!:-0
 
I have the same similar incident as yours. I recreated system.mdw using the Wrkgadm.exe.
 
How? Just leave all permissions off of the users group? Then don't join the workgroup? Holy tek-tips batman!:-0
 
Hi!

Important for work with users and users groups!!!
It's necessary that you:
1. create your own work group file (*.mdw)
>>>>>> Open Wrkgadm.exe, push <Create> and follow instruction of wizard. Save your new MDW file in the needed folder and with your elect file name e.g. C:\MySampleDB\SamplMDW.MDW.
Then open MS Access, open <Tools>;<Security>;<User and Group Accounts>;
2. remove all permissions of &quot;Users&quot; group as well as &quot;User&quot; and &quot;Admin&quot;
3. add at least two new users groups for differece of permissions (for example: &quot;AppAdmins&quot;,&quot;AddReadWriteUsers&quot;,&quot;ReadOnlyUsers&quot;).
4. add necessary users and add group members for each user.

I don't use wizard for Secure database creating because DB upgrade after, is very complicated. My programs analise CurrentUser's permissions (see at function &quot;IsUserInGroup&quot; below). With help of this function is possible to set most of application's object (include Enabled, Visible, Allow..., Form.MenuBar and more other)
Also I made special forms for users and group accounts administration from MS Access applications. If do you interest to these solutions I can send you Sample DB (for MS Access 2000 or 97) with this and several other samples.

Function IsUserInGroup(Optional strUser As String = &quot;&quot;, Optional strGroup As String = &quot;&quot;) As Boolean
'This is function for verifying of user's group
'If is omitted strUser (user name), CurrentUser is verified
'If is omitted strGroup (user group), &quot;Admins&quot; group is verified
On Error GoTo Err_IsUserInGroup
Dim usr As User

If strUser = &quot;&quot; Then strUser = CurrentUser
If strGroup = &quot;&quot; Then strGroup = &quot;Admins&quot;

Set usr = DBEngine.Workspaces(0).Groups(strGroup).Users(strUser)

'If group <strGroup> have not user <strUser> then error is generated
IsUserInGroup = True

Exit_IsUserInGroup:
Exit Function

Err_IsUserInGroup:
If Err.Number <> 3265 Then
'3265 >>> Item not found in this collection:
'consequently IsUserInGroup = False
MsgBox &quot;Error No &quot; & Err.Number & vbLf & Err.Description, , &quot;Function IsUserInGroup&quot;
End If
Resume Exit_IsUserInGroup

End Function


I hope this will little help you.

Aivars

alaganovskis@hotmail.com
 
Whew!

Thanks guys!!! I'm going to look into this stuff and come back to you! Holy tek-tips batman!:-0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top