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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Protect Form access

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
I have set already a protection on a whole database. What (how) can I protect only a Form, he should only be accessible by my boss ? He only can modify data along the Form. Finally the complete database should be converted to an MDE file.
 
If the form opens from a form then do a check

If myCurrentUser = "MyShinyBoss" Then
DoCmd.OpenForm "MyShinyBossForm"
Else
MsgBox "You are not my Boss"
End If


I suppose you do have for everyone a user name that myCurrentUser function should return. Even more, you could store the boss attribute at the users table and do that check with a simple DLookup, since they tend to come 'n' go with the wind [wink]
 
No, I never worked before with a myCurrentUser table, but its a great idea. Its the current user of my application I suppose and everyone should LogIn before opening the access table ?
 
>I have set already a protection on a whole database

How have you implimented this?
[ul]
[li]Password-Protected database[/li]
[li]User-Level Security [/li]
[li]Your own way[/li]
[/ul]

BTW CurrentUser is a build in function that returns what it says.
 
Jerry,

I practice Password-Protected database on the whole database.

I will do it for this dbase on User-Level.
I define a few users. MyBoss and AllOtherUsers. I have never done it before.


 

Option 1 is equal to nothing. If you don't apply user level security, make your FE to show only forms & reports. If you create a table for users allowed to do specific jobs you might consider create a table of users belonging to groups that are allowed to do the jobs. No how would you determine who is the user sitting on a PC and trying to do something? By his username or computer name, maybe.

Good luck. I 'll be happy to help if I may.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top