Make password Invisible or all ****** (stars)

  • Thread starter cw via AccessMonster.com
  • Start date
C

cw via AccessMonster.com

This is my code behind a button on my main form:
-------------------------------------------------------------------
On Error GoTo Err_Command10_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim X As Variant
X = InputBox("Please enter password to open this form:", "PASSWORD Prompt")
If X = "password" Then
stDocName = "frmAdvancedSearchProvisioning"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox ("Sorry, you cannot Open the Provisioning Form.")
End If

Exit_Command10_Click:
Exit Sub

Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
------------------------------------------------------

When the user clicks on the button, a Pop-Up form asks for Password.
If they type in the password in the box, it displays the actual text.

How do I make the password that the user types in only display the text as
stars using my code above?

Can I format my password as a variable?

Thanks for the help.
cw
 
D

Dirk Goldgar

cw via AccessMonster.com said:
This is my code behind a button on my main form:
-------------------------------------------------------------------
On Error GoTo Err_Command10_Click

Dim stDocName As String
Dim stLinkCriteria As String
Dim X As Variant
X = InputBox("Please enter password to open this form:", "PASSWORD
Prompt") If X = "password" Then
stDocName = "frmAdvancedSearchProvisioning"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Else
MsgBox ("Sorry, you cannot Open the Provisioning Form.")
End If

Exit_Command10_Click:
Exit Sub

Err_Command10_Click:
MsgBox Err.Description
Resume Exit_Command10_Click
------------------------------------------------------

When the user clicks on the button, a Pop-Up form asks for Password.
If they type in the password in the box, it displays the actual text.

How do I make the password that the user types in only display the
text as stars using my code above?

Can I format my password as a variable?

You can't do it with the InputBox function. You must use your own
dialog form, with a text box for the password. Then you can set the
text box's Input Mask property to "Password".
 
R

Rick B

A bigger question is what prevents your users from simply opening the form
from the database window? Or opening the table directly and
viewing/editing/deleting the data? Or, what keeps them from simply looking
at your code and learning your password?


Putting a password on some button does NOT protect the form or data in any
way. It just offers an illusion of some type of protection.


In order to protect your data, forms, tables, etc. you'd need to implement
User-Level Security. Users could then type their password ONCE when they
open the database, and would have the appropriate access for all objects set
at that time.

Security FAQ

http://support.microsoft.com/?id=207793



The Security Whitepaper is also worth reading to help you understand.

http://support.microsoft.com/?id=148555



Joan Wild:

www.jmwild.com/AccessSecurity.htm



Lynn Trapp

http://www.ltcomputerdesigns.com/Security.htm
 
C

cw via AccessMonster.com

Dirk & Rick. Thanks for the response. I appreciate it.

Everytime I look at Access security, I think of having to go back to school
to learn a new subject?
From your experience,
- Is it easy & straight forward to use it?
- How long does it take to implement?
- Do I have to re-train my users?

You don't have to answer those questions, I'm planning to begin my education
now.

I would much rather learn & use the recommended security method rather than
re-invent the wheel.

Thanks again,
cw

Rick said:
A bigger question is what prevents your users from simply opening the form
from the database window? Or opening the table directly and
viewing/editing/deleting the data? Or, what keeps them from simply looking
at your code and learning your password?

Putting a password on some button does NOT protect the form or data in any
way. It just offers an illusion of some type of protection.

In order to protect your data, forms, tables, etc. you'd need to implement
User-Level Security. Users could then type their password ONCE when they
open the database, and would have the appropriate access for all objects set
at that time.

Security FAQ

http://support.microsoft.com/?id=207793

The Security Whitepaper is also worth reading to help you understand.

http://support.microsoft.com/?id=148555

Joan Wild:

www.jmwild.com/AccessSecurity.htm

Lynn Trapp

http://www.ltcomputerdesigns.com/Security.htm
This is my code behind a button on my main form:
-------------------------------------------------------------------
[quoted text clipped - 30 lines]
Thanks for the help.
cw
 
R

Rick B

It is not easy to set up the first time, but if you make a couple of backups
for safety, and read the documentation completely before starting you should
be fine. The important thing is to follow every step in order.

It should take you less than a day to make your backups, secure your files,
and create your users and groups.

Your users should see almost no difference, except for entering a password
when they open the database.

To truly utilize security to it's fullest, you would want to take away all
the access to tables and queries from the users. You'd then create forms
based on queries set to run with owner permission. This would prevent them
from opening the tables directly.

You may want to practice with a small file with only one or two tables,
queries, reports, and forms. And create just a couple of users and groups.
Play with it for a few days and make sure you understand it all. Make sure
to place a copy on another PC and work through any issues that arise. Can
the new PC access the file? Is the security still in place for that PC?
Can the user create a new database file without having to sign in first?

Don't be afraid to post questions if you have any.

Good Luck,
--
Rick B



cw via AccessMonster.com said:
Dirk & Rick. Thanks for the response. I appreciate it.

Everytime I look at Access security, I think of having to go back to
school
to learn a new subject?
From your experience,
- Is it easy & straight forward to use it?
- How long does it take to implement?
- Do I have to re-train my users?

You don't have to answer those questions, I'm planning to begin my
education
now.

I would much rather learn & use the recommended security method rather
than
re-invent the wheel.

Thanks again,
cw

Rick said:
A bigger question is what prevents your users from simply opening the form
from the database window? Or opening the table directly and
viewing/editing/deleting the data? Or, what keeps them from simply
looking
at your code and learning your password?

Putting a password on some button does NOT protect the form or data in any
way. It just offers an illusion of some type of protection.

In order to protect your data, forms, tables, etc. you'd need to implement
User-Level Security. Users could then type their password ONCE when they
open the database, and would have the appropriate access for all objects
set
at that time.

Security FAQ

http://support.microsoft.com/?id=207793

The Security Whitepaper is also worth reading to help you understand.

http://support.microsoft.com/?id=148555

Joan Wild:

www.jmwild.com/AccessSecurity.htm

Lynn Trapp

http://www.ltcomputerdesigns.com/Security.htm
This is my code behind a button on my main form:
-------------------------------------------------------------------
[quoted text clipped - 30 lines]
Thanks for the help.
cw
 
D

Dirk Goldgar

cw via AccessMonster.com said:
Dirk & Rick. Thanks for the response. I appreciate it.

Everytime I look at Access security, I think of having to go back to
school to learn a new subject?
From your experience,
- Is it easy & straight forward to use it?
- How long does it take to implement?

It's easy to get the setup wrong, but if you read the Security FAQ
carefully -- twice through would be good -- and follow its steps
exactly, it's not really so hard and it doesn't take long. In recent
versions of Access, the User-level Security Wizard actually does a
decent job.

You may want to put some thought into what user groups you assign your
users to, and what permissions they should have.
- Do I have to re-train my users?

Only to the extent that some users may have been accustomed to do
whatever they want in your database, and now they can't. That can be a
political problem.
You don't have to answer those questions, I'm planning to begin my
education now.

I would much rather learn & use the recommended security method
rather than re-invent the wheel.

I do recommend this approach over making your own forms and user tables.
Kudos to Rick B for addressing the larger question behind your original
post.
 
C

cw via AccessMonster.com

Thanks again,
All of my database are already Front-End/Back-End types & all have "zero"
access to tables/queries.
I don't even give them the opportunity to see the Access background as it's
hidden using API.

100% of all work is done via pop-up/modal Forms only. Even the reports are
Form-based.

I'll begin slowly with the documentation. Hopefully it will work with my
"hidden Access background"


Thanks all again,
cw

Dirk said:
Dirk & Rick. Thanks for the response. I appreciate it.
[quoted text clipped - 3 lines]
- Is it easy & straight forward to use it?
- How long does it take to implement?

It's easy to get the setup wrong, but if you read the Security FAQ
carefully -- twice through would be good -- and follow its steps
exactly, it's not really so hard and it doesn't take long. In recent
versions of Access, the User-level Security Wizard actually does a
decent job.

You may want to put some thought into what user groups you assign your
users to, and what permissions they should have.
- Do I have to re-train my users?

Only to the extent that some users may have been accustomed to do
whatever they want in your database, and now they can't. That can be a
political problem.
You don't have to answer those questions, I'm planning to begin my
education now.

I would much rather learn & use the recommended security method
rather than re-invent the wheel.

I do recommend this approach over making your own forms and user tables.
Kudos to Rick B for addressing the larger question behind your original
post.
 

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

Similar Threads


Top