A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

password-protected form



 
 
Thread Tools Display Modes
  #1  
Old July 30th, 2004, 06:03 AM
Sam Kuo
external usenet poster
 
Posts: n/a
Default password-protected form

Katherine wrote:
Is it possible to password protect a form rather than the
entire Database?


Gerald Stanley replied:
Something along the lines of

Private Sub Form_Open(Cancel As Integer)
Const strFormPassword As String = "Password"


If InputBox("Please Enter Password") strFormPassword Then
MsgBox "Password Incorrect", vbOKOnly
Cancel = True
End If


End Sub


I have a commond button on form1 that opens the password-protected form2. If incorrect password is entered, the code above shuts form1 which was opened originally. Can this code be altered in such way that form1 remains open if incorrect password is entered, and possibly with a pop-up message asking to try again?

Sorry that I am not code literate at all. Thanks for any help!
Sam
Ads
  #2  
Old July 30th, 2004, 01:43 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default password-protected form

"Sam Kuo" .(donotspam) wrote in message
...
Katherine wrote:
Is it possible to password protect a form rather than the
entire Database?


Gerald Stanley replied:
Something along the lines of

Private Sub Form_Open(Cancel As Integer)
Const strFormPassword As String = "Password"


If InputBox("Please Enter Password") strFormPassword Then
MsgBox "Password Incorrect", vbOKOnly
Cancel = True
End If


End Sub


I have a commond button on form1 that opens the password-protected form2.

If incorrect password is entered, the code above shuts form1 which was
opened originally. Can this code be altered in such way that form1 remains
open if incorrect password is entered, and possibly with a pop-up message
asking to try again?

If the code behind the button is closing Form1 then there has to be a
statement in the code that is doing so. It would look like...

DoCmd.Close (possibly more arguments here)

Just find that line and remove it.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com



  #3  
Old May 29th, 2010, 01:09 AM posted to microsoft.public.access.forms
blanch2009
external usenet poster
 
Posts: 11
Default password-protected form

How do you clear or reset the password?

"Sam Kuo" wrote:

Katherine wrote:
Is it possible to password protect a form rather than the
entire Database?


Gerald Stanley replied:
Something along the lines of

Private Sub Form_Open(Cancel As Integer)
Const strFormPassword As String = "Password"


If InputBox("Please Enter Password") strFormPassword Then
MsgBox "Password Incorrect", vbOKOnly
Cancel = True
End If


End Sub


I have a commond button on form1 that opens the password-protected form2. If incorrect password is entered, the code above shuts form1 which was opened originally. Can this code be altered in such way that form1 remains open if incorrect password is entered, and possibly with a pop-up message asking to try again?

Sorry that I am not code literate at all. Thanks for any help!
Sam

  #4  
Old May 29th, 2010, 04:09 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default password-protected form


"blanch2009" wrote in message
...
How do you clear or reset the password?


I think you need to tell us which password in which version of Access,
before anyone can give you a good answer.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


  #5  
Old May 29th, 2010, 08:58 PM posted to microsoft.public.access.forms
blanch2009
external usenet poster
 
Posts: 11
Default password-protected form

I'm sorry,
I was using the comments in this thread to password a form in Access 2007.

The code that was suggested works "ok", the password window pops open but
you can see the password as it's typed, not good in most situations and then
the first time you type a password I'm assuming that password is stored.
hidden somewhere. The next time you open the form, the password window opens
and you type in the password. I'd say that's ok but I'm testing and would
like to reset the password, or allow for another password.
I have one person that will be using this form so the one password
limitation is ok in this instance. I would like to learn how to create a
form that requires a user to enter there name & password before the form can
open.

Thank you in advance and I'm hoping I've explained what it is I'm trying to
do.

Don


"Arvin Meyer [MVP]" wrote:


"blanch2009" wrote in message
...
How do you clear or reset the password?


I think you need to tell us which password in which version of Access,
before anyone can give you a good answer.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


.

  #6  
Old May 29th, 2010, 11:00 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default password-protected form

Unless you are using the MDB format, you cannot secure individual objects
using Access security. Even with Access security you cannot require a
password for a single form. What you can do however is determine who the
user is using code like:

http://www.mvps.org/access/api/api0008.htm

Knowing who the user is, can allow you to choose whether or not to allow
him/her to access any objects in the database.

I typically add a hidden table to the database with permission levels for
each user, then store that in a global variable, then check that in the form
load or form open event to see if the user has sufficient permissions to
access that object.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"blanch2009" wrote in message
...
I'm sorry,
I was using the comments in this thread to password a form in Access 2007.

The code that was suggested works "ok", the password window pops open but
you can see the password as it's typed, not good in most situations and
then
the first time you type a password I'm assuming that password is stored.
hidden somewhere. The next time you open the form, the password window
opens
and you type in the password. I'd say that's ok but I'm testing and would
like to reset the password, or allow for another password.
I have one person that will be using this form so the one password
limitation is ok in this instance. I would like to learn how to create a
form that requires a user to enter there name & password before the form
can
open.

Thank you in advance and I'm hoping I've explained what it is I'm trying
to
do.

Don


"Arvin Meyer [MVP]" wrote:


"blanch2009" wrote in message
...
How do you clear or reset the password?


I think you need to tell us which password in which version of Access,
before anyone can give you a good answer.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


.



  #7  
Old May 30th, 2010, 05:36 PM posted to microsoft.public.access.forms
blanch2009
external usenet poster
 
Posts: 11
Default password-protected form

Thank you Arvin for your reply.

I have no coding experience and don't know how to do what your suggesting.

I followed your link to the code that will call for the user name and built
a module for the code to reside in but I have no idea what to do with it now.

This all sounds very difficult to do.

Thanks Arvin

Don


"Arvin Meyer [MVP]" wrote:

Unless you are using the MDB format, you cannot secure individual objects
using Access security. Even with Access security you cannot require a
password for a single form. What you can do however is determine who the
user is using code like:

http://www.mvps.org/access/api/api0008.htm

Knowing who the user is, can allow you to choose whether or not to allow
him/her to access any objects in the database.

I typically add a hidden table to the database with permission levels for
each user, then store that in a global variable, then check that in the form
load or form open event to see if the user has sufficient permissions to
access that object.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"blanch2009" wrote in message
...
I'm sorry,
I was using the comments in this thread to password a form in Access 2007.

The code that was suggested works "ok", the password window pops open but
you can see the password as it's typed, not good in most situations and
then
the first time you type a password I'm assuming that password is stored.
hidden somewhere. The next time you open the form, the password window
opens
and you type in the password. I'd say that's ok but I'm testing and would
like to reset the password, or allow for another password.
I have one person that will be using this form so the one password
limitation is ok in this instance. I would like to learn how to create a
form that requires a user to enter there name & password before the form
can
open.

Thank you in advance and I'm hoping I've explained what it is I'm trying
to
do.

Don


"Arvin Meyer [MVP]" wrote:


"blanch2009" wrote in message
...
How do you clear or reset the password?

I think you need to tell us which password in which version of Access,
before anyone can give you a good answer.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


.



.

  #8  
Old May 31st, 2010, 10:16 PM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default password-protected form

I'm building a quick sample application which will be called Security.mdb,
located at:

http://www.accessmvp.com/arvin

If these newsgroups are closed just keep checking, it will be there within a
day.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"blanch2009" wrote in message
...
Thank you Arvin for your reply.

I have no coding experience and don't know how to do what your suggesting.

I followed your link to the code that will call for the user name and
built
a module for the code to reside in but I have no idea what to do with it
now.

This all sounds very difficult to do.

Thanks Arvin

Don


"Arvin Meyer [MVP]" wrote:

Unless you are using the MDB format, you cannot secure individual objects
using Access security. Even with Access security you cannot require a
password for a single form. What you can do however is determine who the
user is using code like:

http://www.mvps.org/access/api/api0008.htm

Knowing who the user is, can allow you to choose whether or not to allow
him/her to access any objects in the database.

I typically add a hidden table to the database with permission levels for
each user, then store that in a global variable, then check that in the
form
load or form open event to see if the user has sufficient permissions to
access that object.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"blanch2009" wrote in message
...
I'm sorry,
I was using the comments in this thread to password a form in Access
2007.

The code that was suggested works "ok", the password window pops open
but
you can see the password as it's typed, not good in most situations and
then
the first time you type a password I'm assuming that password is
stored.
hidden somewhere. The next time you open the form, the password window
opens
and you type in the password. I'd say that's ok but I'm testing and
would
like to reset the password, or allow for another password.
I have one person that will be using this form so the one password
limitation is ok in this instance. I would like to learn how to create
a
form that requires a user to enter there name & password before the
form
can
open.

Thank you in advance and I'm hoping I've explained what it is I'm
trying
to
do.

Don


"Arvin Meyer [MVP]" wrote:


"blanch2009" wrote in message
...
How do you clear or reset the password?

I think you need to tell us which password in which version of Access,
before anyone can give you a good answer.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


.



.



  #9  
Old June 1st, 2010, 04:25 AM posted to microsoft.public.access.forms
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default password-protected form

Here it is:

http://accessmvp.com/Arvin/Security.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley



"Arvin Meyer [MVP]" wrote in message
...
I'm building a quick sample application which will be called Security.mdb,
located at:

http://www.accessmvp.com/arvin

If these newsgroups are closed just keep checking, it will be there within
a day.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"blanch2009" wrote in message
...
Thank you Arvin for your reply.

I have no coding experience and don't know how to do what your
suggesting.

I followed your link to the code that will call for the user name and
built
a module for the code to reside in but I have no idea what to do with it
now.

This all sounds very difficult to do.

Thanks Arvin

Don


"Arvin Meyer [MVP]" wrote:

Unless you are using the MDB format, you cannot secure individual
objects
using Access security. Even with Access security you cannot require a
password for a single form. What you can do however is determine who the
user is using code like:

http://www.mvps.org/access/api/api0008.htm

Knowing who the user is, can allow you to choose whether or not to allow
him/her to access any objects in the database.

I typically add a hidden table to the database with permission levels
for
each user, then store that in a global variable, then check that in the
form
load or form open event to see if the user has sufficient permissions to
access that object.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"blanch2009" wrote in message
...
I'm sorry,
I was using the comments in this thread to password a form in Access
2007.

The code that was suggested works "ok", the password window pops open
but
you can see the password as it's typed, not good in most situations
and
then
the first time you type a password I'm assuming that password is
stored.
hidden somewhere. The next time you open the form, the password
window
opens
and you type in the password. I'd say that's ok but I'm testing and
would
like to reset the password, or allow for another password.
I have one person that will be using this form so the one password
limitation is ok in this instance. I would like to learn how to
create a
form that requires a user to enter there name & password before the
form
can
open.

Thank you in advance and I'm hoping I've explained what it is I'm
trying
to
do.

Don


"Arvin Meyer [MVP]" wrote:


"blanch2009" wrote in message
...
How do you clear or reset the password?

I think you need to tell us which password in which version of
Access,
before anyone can give you a good answer.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


.



.





  #10  
Old June 3rd, 2010, 05:21 PM posted to microsoft.public.access.forms
blanch2009
external usenet poster
 
Posts: 11
Default password-protected form

Thank you very much Arvin.

I'll give this a look.

Thanks again

Don

"Arvin Meyer [MVP]" wrote:

Here it is:

http://accessmvp.com/Arvin/Security.zip
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley



"Arvin Meyer [MVP]" wrote in message
...
I'm building a quick sample application which will be called Security.mdb,
located at:

http://www.accessmvp.com/arvin

If these newsgroups are closed just keep checking, it will be there within
a day.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"blanch2009" wrote in message
...
Thank you Arvin for your reply.

I have no coding experience and don't know how to do what your
suggesting.

I followed your link to the code that will call for the user name and
built
a module for the code to reside in but I have no idea what to do with it
now.

This all sounds very difficult to do.

Thanks Arvin

Don


"Arvin Meyer [MVP]" wrote:

Unless you are using the MDB format, you cannot secure individual
objects
using Access security. Even with Access security you cannot require a
password for a single form. What you can do however is determine who the
user is using code like:

http://www.mvps.org/access/api/api0008.htm

Knowing who the user is, can allow you to choose whether or not to allow
him/her to access any objects in the database.

I typically add a hidden table to the database with permission levels
for
each user, then store that in a global variable, then check that in the
form
load or form open event to see if the user has sufficient permissions to
access that object.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


"blanch2009" wrote in message
...
I'm sorry,
I was using the comments in this thread to password a form in Access
2007.

The code that was suggested works "ok", the password window pops open
but
you can see the password as it's typed, not good in most situations
and
then
the first time you type a password I'm assuming that password is
stored.
hidden somewhere. The next time you open the form, the password
window
opens
and you type in the password. I'd say that's ok but I'm testing and
would
like to reset the password, or allow for another password.
I have one person that will be using this form so the one password
limitation is ok in this instance. I would like to learn how to
create a
form that requires a user to enter there name & password before the
form
can
open.

Thank you in advance and I'm hoping I've explained what it is I'm
trying
to
do.

Don


"Arvin Meyer [MVP]" wrote:


"blanch2009" wrote in message
...
How do you clear or reset the password?

I think you need to tell us which password in which version of
Access,
before anyone can give you a good answer.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


.



.





.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Doesn't Go To New Record Steve New Users 15 May 16th, 2004 04:33 PM
Prevent access to macro's if sheet is password protected Frank Kabel Worksheet Functions 2 May 2nd, 2004 06:22 PM
Prevent access to macro's if sheet is password protected sonar Worksheet Functions 0 May 2nd, 2004 04:34 PM
Changing dsn connection information (Password) Mike N Worksheet Functions 2 December 3rd, 2003 09:04 PM


All times are GMT +1. The time now is 07:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 OfficeFrustration.
The comments are property of their posters.