Restrict access to a form

D

Don Stone

Hi--

I have a database containing many forms. Some forms need to be accessed only by administrators while other forms are for the general users.

I have searched many locations and have found that most give quite complicated answers. Is there some reasonably simply solution like putting a password in the code for opening the form? Or, must I set up a complicated scheme?

Thanks in advance for any help!

Don
 
L

ldiaz

You can create a table with privileges by user name:

like:

User_Name OpenForm EditInfo DeleteInfo Admin
lhernandez TRUE False False False

then make an startup form where you can add a button to open another form:

then add the statement based in that is false, then do not allow access.


Thanks
LD
 
D

Don Stone

Thanks, I'll try it.

ldiaz said:
You can create a table with privileges by user name:

like:

User_Name OpenForm EditInfo DeleteInfo Admin
lhernandez TRUE False False False

then make an startup form where you can add a button to open another form:

then add the statement based in that is false, then do not allow access.


Thanks
LD
 
R

Rick Brandt

Hi--

I have a database containing many forms. Some forms need to be accessed
only by administrators while other forms are for the general users.

I have searched many locations and have found that most give quite
complicated answers. Is there some reasonably simply solution like
putting a password in the code for opening the form? Or, must I set up
a complicated scheme?

Thanks in advance for any help!

Don<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR> <STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi--</FONT></DIV> <DIV><FONT face=Arial
size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>I have a
database containing many forms.&nbsp; Some forms need to be accessed
only by administrators while other forms are for the general
users.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial
size=2>I have searched many locations and&nbsp;have found that most give
quite complicated answers.&nbsp; Is there some reasonably simply
solution like putting a password in the code for opening the form?&nbsp;
Or, must I set up a complicated scheme?</FONT></DIV> <DIV><FONT
face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial
size=2>Thanks in advance for any help!</FONT></DIV> <DIV><FONT
face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial
size=2>Don</FONT></DIV></BODY></HTML>

There are simple answers if you have simple users. In the Open event of
a protected form...

If InputBox("Enter Password") <> "MyPassWord" Then
Cancel = True
End if

You would have to give your users an MDE rather than an MDB to make it at
least a bit difficult to see what your password is by looking at the code.
 
T

tina

yes, it can be as simple as putting a password in the code that opens the
form. but that's pretty useless unless you 1) safeguard the code, and 2)
safeguard the form, so the user must run the code to open the form. and none
of this adds any value unless you safeguard the table(s) that store the data
which is accessed via the form, which further means 3) safeguarding the
tables, and that means 4) safeguarding the database window of the frontend
database, AND safeguarding the backend database where the tables reside.

whether you use Access' built-in security or grow your own, security is just
not that simple. to get a lot of ideas, and the instructions to implement
them, in one place, suggest you get a copy of Garry Robinson's Real World
Microsoft Access Database Protection and Security. If you have A2007, i
don't know how much of it will apply.

hth


Hi--

I have a database containing many forms. Some forms need to be accessed
only by administrators while other forms are for the general users.

I have searched many locations and have found that most give quite
complicated answers. Is there some reasonably simply solution like putting
a password in the code for opening the form? Or, must I set up a
complicated scheme?

Thanks in advance for any help!

Don
 

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