Password help (1 Viewer)

Cpar

Registered User.
Local time
Yesterday, 23:19
Joined
Jan 9, 2016
Messages
41
Hi everyone. I made a data base with a form that a team of people will fill out. I would like to add perms or maybe a password to one field on my form. I am very lost on how to do this. Do i have to write VBA for it? or is it in the access program already. Thanks in advance.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:19
Joined
May 7, 2009
Messages
19,246
you must initially have another control in your form selected by setting focus to it:

Private Sub Form_Load()
' shift focus on some other textbox/combobox on your form
Me.anotherTextBox.SetFocus
End If

Private Sub controlNameYouWantToHavePassWord_Enter()
' your code goes here to check password
End Sub
 

Cpar

Registered User.
Local time
Yesterday, 23:19
Joined
Jan 9, 2016
Messages
41
Arnelgp can you give me an example on how to check my password with code? I am not understanding.
 

Cpar

Registered User.
Local time
Yesterday, 23:19
Joined
Jan 9, 2016
Messages
41
What i really want (and i think you can do this) is when someone logs in to their computer they have their own perms in Access.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 05:19
Joined
Sep 12, 2006
Messages
15,710
you need to change all your forms and objects that are affected.
ie - add code to do what you require.

you either need to explicitly grant or deny permissions based on the user name. doing it this way is a pain, as it means you have to amend your database with each change in user.

The other way is to manage users within user groups and grant permissions to the user groups. The programming job is roughly the same, but to add new users all you then need to do is add them to the appropriate groups, which can be done easily without changing the database.

It's not trivial though. You need code for every object that you do not want everyone to have unlimited access.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:19
Joined
Feb 28, 2001
Messages
27,321
Your biggest problem is that since Ac2003, permissions are not implemented; you have to "roll your own" by controlling things from behind the scenes on forms - which implies that your users must never see the "true" database. Only its forms.

If you have a "switchboard" or "dispatcher" form that comes up automatically and stays maximized and can't be closed (until you are exiting the app) and keeps itself always on top, then you can control what the users do. At that point, it becomes possible to impose per-user controls for such things as user permissions or role-based permissions. This forum has lots of posts on the subject of user security. Go to the top of your page and play with the Search option in the bar immediately under the navigation block.
 

Users who are viewing this thread

Top Bottom