Controlling access to a form

shabbaranks

Registered User.
Local time
Today, 21:23
Joined
Oct 17, 2011
Messages
300
Hi there...

Im trying to control access to a form I have two ideas and thought Id see if anyone has any suggestions. Ive thought of numerous methods where you can have a deppartment ID and the button ref's that to allow access. Or add user names to the vba code so only those name would be able to access the forms.

Ideally I would like to add a method inwhich it would take more than someone to edit the code to allow them in or add thier name to the allowed group - but Im not too sure if this is possible with Access as it stands?

Thanks
 
I think later versions of Access may have their own user permissions and group set ups, which allow access to various objects but I've always wanted to create my own.
To do this effectively, you'd need a login process and in that way you can specify a group or user level access they belong to and only members of a certain group or ULA would have access to that form and the easiest way is to enable or disable a button that opens the form depending on above.
Another way might be to use the GetUserName system library function and if the person is listed as having access to the form, enable the button to open it, else disable it

David
 
Thanks David, I have the getusername function within my database already. The bit I was concerned about (and I think this would be the case regardless) the table holding who can have access to what could easily be changed so a user could add thier login name to the access what ever I am trying to restrict. Im guessing if I want to implement better tighter security sql is the way to go.
 
One option might be to have the list of users in a separate database DB2 and when the lookup is about to be done, you link to the table in DB2, do your lookup and then delete the table, this would be done in vba so the user would never be aware what is happening. So they'd click the button to open the form, the database would link the table, do the lookup, establish if they have permission to use the form, delete the table and then either open the form or display a message to say "user doesn't have permissions to open the form"
David
 

Users who are viewing this thread

Back
Top Bottom