Question on coding permissions.

M

Myname Isprivate

Hello,

I asked this question a few weeks ago, but I want to try something different
than the advice I was given if possible. I have made a database for our
financial department. I set it up with a logon form (just to see if I could
make it work) that prompts when username or password is incorrect and will
shut down the application after 3 attempts. This was coded in VB. Now, our
CFO likes this db so much she wants to expand it to other departments with
their own forms, but all departments concerned can't see certain info. I
want to know if it is possible, in VB, to code "permissions" based on db
logons. As an example, I have on main switchboard linking to all forms. If
a user logs on, can I code it so based on the logon they enter (which is in a
table containing username and password), they can only see or be able to
click certain command buttons on the main switchboard? I know Access has
security settings, but these can be confusing, and really, I just want to
know if I can do it in VB. Any help would be appreciated.
 
B

Brendan Reynolds

If you add tables and fields to keep track of which users are allowed to
click which buttons, sure, you could add code to the Open event of a form to
query those tables and enable/disable buttons accordingly. I don't think
it's a very good idea, especially if you're doing it because you think the
built-in security is complex, because I think the 'roll-your-own' approach
will probably end up more complex and less effective. So I don't advise it,
but yes, it is possible.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top