pgstein
02-07-2006, 01:42 PM
Hi,
I am currently trying to make a database that is secure. Basically what I need is for only certain logins to be able to edit the queries. I can read the login using the Environ function, but don't know what to do from there.
Is there any way to write VBA code that makes object/queries uneditable? I have code that makes it impossible to make new ones, but not edit the current ones. I could then just run this on startup based on the username.
I have thought of using the user-level security, but many people will be using this and I don't know their logins and passwords.
Sorry if I am being vague, any questions I will answer. I have searched the forums and cannot find any help. Thanks in advance for any responses,
Paul
KenHigg
02-07-2006, 02:17 PM
Are you using the Access security feature with a new Workgroup?
pgstein
02-07-2006, 02:32 PM
To be quite honest, I have no idea what a workgroup is used for. Ive only been using Access for 2 days. I am trying to look it up, but i can't really find a clear cut answer. What is it? and would it help me? Thanks!
KenHigg
02-07-2006, 02:38 PM
Access has a built-in robust security feature but is may be quite the bear for a newbie. However if you anticipate the need for this kind of security, I would suggest getting a good Access book and learning it. Otherwise you could do some pseudo securtiy stuff using code but unless you get rather elaborate, users can still get behind it mess things up... Sorry, not much help, huh?
:)
pgstein
02-07-2006, 02:56 PM
That is fine, I have no problem grabbing a book and learning the stuff that I need. The problem I am having is that my boss wants to know if it is possible to do...tommarow.
Is a workgroup basically the user-level security stuff, but it can be shared over a network (one file that contains everyones logins)? If i did this, would there be anyway that i could make it use their windows login/password? I dont need a solution, just a yes or no. I dont want to get bit in the ass.
thanks again for you help, and dealing with my stupid questions.
Paul
KenHigg
02-07-2006, 03:14 PM
The Access security stuff has nothing to do with the Windows or Network security stuff. I suppose one quick solution without having to use the Access security would be to use the "Environ("UserName")" to get the user and then when the form loads, depending on this user name, disable or enable the textbox...
ghudson
02-07-2006, 04:38 PM
thanks again for you help, and dealing with my stupid questions.
PaulNo such thing as a stupid question...only stupid answers. Unless you look at AccessBoy's (http://www.access-programmers.co.uk/forums/member.php?u=28530) postings. :p
Based on your original question at the top... Users should never have access to the db window. Users should never have access to edit any of the db objects [queries, tables, forms, etc.] Users should never have access to a table. All data viewing and editing should be done within a form and all navigation should be through the forms.
You are just learning so I suggest that you search the forum for the keywords "security" "System.mdw" "passwords" "Environ" for you have a lot to learn before you attempt to secure a db. Post back with more specific questions once you get going.