Password protected form

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

Hi All,

I have a database which has two groups of users. The first group
"auditors" I want to give them access to all of the forms, the second
group "team managers", I only want them to have access to 3 forms.

I've looked into user level access and I don't think its appropriate as
I'm on a network and all the computers belong to the same workgroup.

Can I have it so if a form is selected from the switchboard that it
pops up a msgbox and asks for a password?

I've created a table with "Auditors" and "Team Managers" and it has
there passwords in that.

Can anyone help pls?

Adam

Access 97
 
Jet user-and-group level security is probably the best solution - the fact
that you are on a network and that all computers are part of the same
workgroup does not change that at all. Jet user-and-group level security is
completely separate from operating system security.

For an introduction to Jet user-and-group level security, see the following
KB article ...
http://msdn.microsoft.com/library/en-us/dnacc2k2/html/odc_AcSecurity.asp

Alternatively, for a 'roll-your-own' approach to password protecting a
single form, see the following KB article ...
http://support.microsoft.com/default.aspx?scid=kb;en-us;209871
 
Hi All,

I have a database which has two groups of users. The first group
"auditors" I want to give them access to all of the forms, the second
group "team managers", I only want them to have access to 3 forms.

I've looked into user level access and I don't think its appropriate
as I'm on a network and all the computers belong to the same
workgroup.

That sounds like just want you want for user level security.

I suggest you start by reading
http://support.microsoft.com/default.aspx?scid=kb;[LN];207793

Access security is a great feature, but it is, by nature a complex product
with a very steep learning curve. Properly used it offers very safe
versatile protection and control. However a simple mistake can easily lock
you out of your database, which might require the paid services of a
professional to help you get back in.

Practice on some copies to make sure you know what you are doing.
 
If you don't want to use user level security, then the following may work
for you.

1 table with username,password, user_level (user,manager)

2 global variables to hold username, and user_level

when you open any of the password protected forms check the global variable
to see if it is <> ""
if it = "" then
you need a dialog form with a username textbox and password textbox
on clicking ok in the form, check the username and password if they match
then load the global variable with the username and load the user_level
global variable with the user_level field from the table.

if they have the correct level of permission then open the form for them

if the global variable <> "" then check user_level to see if the user is
allowed to use the form

I don't normally use global variables but in this case they work very well.
 

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

Back
Top