By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,316 Members | 2,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,316 IT Pros & Developers. It's quick & easy.

Permissions Question

P: 5
I am running Access 03, and have two tables, I would like three columns in one table to be edited by some employees, and full permission of editing fields by others. Can this be accomplished through the security settings? Ideally two separate passwords would be used, one for admin, and one for regular employees, similar to a Windows login, then based on the password given, have three columns be capable of updates, or all columns be capable of updates. Thanks for any help.

May 5 '09 #1
Share this Question
Share on Google+
5 Replies

Expert 100+
P: 1,356
You can do this by enabling or disabling the fields on a form according to the user in question. You would need to hide the database window and it does depend on how secure you would like this to be as to how much time and effort you want to put into it as to how you would or could lock things down.
May 5 '09 #2

P: 5
It is a simple inventory list, I just don't want data getting erased on accident. I want to spend very little time, again just the three fields need updates the others need to be locked to prevent them being accidentally erased or modified. Thanks again.
May 5 '09 #3

Expert 100+
P: 1,356
In order to lock down the fields in question you will need to know a little VBA this isn't really a point and click solution if that is what you are looking for.

However if you do know a little VBA then I will be glad to help as you can use MS Access security or if your in a domain you can use AD or you can use a windows login, it all depends on the security you are looking for. Basically when the form in question loads you would add an event such as Form_OnLoad and insert the appropriate code requesting the user info and then allow editing or not depending on the control.
May 5 '09 #4

P: 5
I could try the VBA steps needed, we are not all going to be using this from the same domain, we have users on-site that will be remote connecting, and accessing a shared drive where the database is located. Security is not terribly important. I just don't want people messing with existing data, they have no real incentive to. I would only need one user, as all on-site people could use the same one.
May 5 '09 #5

Expert 100+
P: 1,356
I would use a routine to cycle the controls on the form and either use the tag or the first three letters of the name of the control i.e SHW so that I would know what needed to be enabled for who etc. again there are many ways to achieve the end result. Setup MS Access security and once you have that.
Expand|Select|Wrap|Line Numbers
  1. Set wks = DBEngine.Workspaces(0)
  2. GrpCount = wsp.Users(strUser).Groups.Count
  4. strGrp= "Whatever you want"
  6. chkFlag = False
  7. For j = 0 To GrpCount - 1
  8.     If wsp.Users(strUser).Groups(j).Name = strGrp  Then
  9.         chkFlag = True
  10.         Exit For
  11.     End If
  12. Next
  14. For Each ctl In Me.Controls
  15. if chkFlag Then
  16.    If Left(C.Name, 3) <> "shw"  Then 
  17. ctl.enabled = true
  18. ctl.locked = false
That would leave the Three fields alone and you could essentially lock or unlock a field or fields etc. From there I think you would have a start let me know if you have any questions.
May 5 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.