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!

User Level Security and Workgroups (WI File)? 1

Status
Not open for further replies.

gyli84

MIS
Aug 6, 2001
67
GB
I have created a secure database whereby users log on by following the instructions as to how to do so within Access. What I would just like to ask is what having the database linked to a certain workgroup information file actually does? I thought that it might mean that the users that I can add to log into my database might be restricted to users found in the workgroup information file but this isn't the case.

Also, does anyone know what expression I could put in the controlsource of a textbox on a form such that the I can display the NAME (as in "John" not their userID) of the "currentuser"? I have a table of users called "tblUsers" with "UserID" (which are the same as the login names assigned to each staff member) and "Name" among the fields.

Thanks in advance.
 
1 - The workgroup file contains users and groups.Usually an application will have users with differing roles - i.e. some with Browse authority, some with Edit and Add authority, others with Add Edit and Delete. These roles can best be utilized as Groups in your application, so when you add a user, you don't have to set permissions on a user level - add the user to the appropriate group, which should have permissions based the groups role. Remember that the WorkGroup file contains Users aand Groups.

However, the permissions are specific to its .MDB file - after you've set up your groups based on their roles - and are setting permissions for the groups - be sure to specify the &quot;<new>&quot; for each object.

Since users other than the ones you entered into the workgroup file have opened your app.- they probably have retail Access and are opening your application as the user &quot;Admin&quot; - which Access defaults to. In order to restrict &quot;non-user&quot; access. Check out this URL - it has a lot of info about Access Security.

2- Give this a try: &quot;=DLookUp(&quot;[name]&quot;,tblusers&quot;,&quot;currentuser() = userid&quot;)&quot;

Hope this is helpful_

gyma :{
 
Thanks for your help

I have secured my database with Access User Level Security and workgroups and now users are required to log on to access it. I have a table called &quot;tblUsers&quot; which contains &quot;UserID&quot; and &quot;Name&quot; amongst other fields. The people who log into the database use the same User IDs as corresponds to their record in &quot;tblUsers&quot;. What I would like to do is place a text box on a form which will display the Name (not the user ID of the person who has logged in). I can easily get the textbox to show the Current user using &quot;=[currentuser]&quot; as the control source but this is not what I want. I have tried:

&quot;=DLookUp(&quot;[Name]&quot;,tblusers&quot;,&quot;CurrentUser() = [UserID]&quot;)&quot; as the control source but it returns #Name?

I have also tried creating a query which has UserID and Name and the criteria of the UserID is [Forms]![frmManagerMenu]![Currentuser] where currentuser is a textbox on the form (=[currentuser]

Have you got any suggestions or know what is going wrong?

Thanks!
 
Sorry - the DLookUp statement i gave to you was not correct - - I omitted a required dblquote.... syntax is a killer! - Try this instead: &quot;=DLookUp(&quot;[name]&quot;,&quot;tblusers&quot;,&quot;currentuser() = userid&quot;)&quot; - remember to remove the outer dblquotes from the DLookUp statement.

Hope THIS is helpful,

gyma :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top