dana_cc said:
...
I tried using the groups security in access but it's not good.
...
Why do you say it is "not good”? If you construct this correctly, using Group Accounts, and granting the required privileges to the appropriate group, and making individual accounts members of the appropriate groups, maintenance will be much easier than the headache you will be creating if you insist on building your own "tack on"
security.
You could set up your two (or more) groups, and two (or more) forms, and grant permissions appropriately. Set up a third form as the Database's Startup Form.
The startup form could do any of the following:-
1) Let them manually choose an option (security would block them from getting through to an option for which they don't have privileges)
2) Automatically assess which group they are a member of and open the appropriate form
3) Attempt to open the "Manager" form, and trap for a security error - if that is encountered, then open the alternate form.
If you insist on pursuing the path you are alluding to then please consider the following questions...
1) What will you do when the manager password becomes compromised (i.e. people know it when they should not)?
2) A good security procedure would require passwords be changed frequently. How will you accommodate this?
3) If you are going to put password(s) in your own table so you can change it (them) without having to change code, what is stopping anyone from reading the table where the password(s) are stored?
3) What is stopping anyone from opening the target "management" form directly (without going via your "password" gate), and even directly accessing all the functionality beyond it, which you are trying to protect?
In short, Access already affords you what you are asking for, via its own security, and does it much better than you will be able to achieve outside of it (but within Access). It might be hard to understand at first, but the alternative is much worse.
HTH
Regards
John.