Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 22nd, 2008, 04:16 PM
ducecoop ducecoop is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 7 ducecoop User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 34 sec
Reputation Power: 0
Password with Asterisk

Access 2003 or 2007

I many cases I will create a button to a form that asks for a password first before the form will open.

Code:
Private Sub cndAdminArea_Click()

    Dim password As String
    Dim Answer As String
    
    password = "admin"
    Answer = InputBox("Enter Admin Password:  ", "Admin Confirmation", "Enter Password")
    If Answer = password Then
    DoCmd.OpenForm "frmUpdate"
    Else
    MsgBox "You have not entered the correct password" & vbLf & _
    "Please check the password and try again OR contact the real Administrator"
    Exit Sub
    End If
End Sub


Problem is that someone looking over your shoulder could see the password.

Can this password protection be coded to show Asterisk's instead of the actual password?

Could someone help me with that code.

Any help here will be appreciated.

Thanks in advance
Dave

Reply With Quote
  #2  
Old November 23rd, 2008, 07:31 PM
ducecoop ducecoop is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 7 ducecoop User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 34 sec
Reputation Power: 0
I have tried adding this to the code

Code:
InputBox.PasswordChar [=*]


either I have the syntax wrong
OR
got it in the wrong place

any suggestions?

Reply With Quote
  #3  
Old November 24th, 2008, 05:42 PM
jlm5419 jlm5419 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Location: Out West
Posts: 29 jlm5419 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 26 sec
Reputation Power: 0
Quote:
Originally Posted by ducecoop
Access 2003 or 2007

I many cases I will create a button to a form that asks for a password first before the form will open.

Code:
Private Sub cndAdminArea_Click()

    Dim password As String
    Dim Answer As String
    
    password = "admin"
    Answer = InputBox("Enter Admin Password:  ", "Admin Confirmation", "Enter Password")
    If Answer = password Then
    DoCmd.OpenForm "frmUpdate"
    Else
    MsgBox "You have not entered the correct password" & vbLf & _
    "Please check the password and try again OR contact the real Administrator"
    Exit Sub
    End If
End Sub


Problem is that someone looking over your shoulder could see the password.

Can this password protection be coded to show Asterisk's instead of the actual password?

Could someone help me with that code.

Any help here will be appreciated.

Thanks in advance
Dave


I had the same problem. I got around it by formatting the box to use Wingdings font type. However, if you have a passwords table, you would use the Password datatype, which would return the asterisks in place of the letters.

Reply With Quote
  #4  
Old November 24th, 2008, 07:28 PM
ducecoop ducecoop is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2007
Posts: 7 ducecoop User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 34 sec
Reputation Power: 0
Quote:
Originally Posted by jlm5419
I had the same problem. I got around it by formatting the box to use Wingdings font type. However, if you have a passwords table, you would use the Password datatype, which would return the asterisks in place of the letters.


Thanks for the reply

If I create a Passwords table (which is not problem and may in fact be a good idea)
How do I "CODE" my above code to read from that table?

EDIT: and to go with your original idea - how would I format the "InputBox" for a particular font?

Reply With Quote
  #5  
Old December 2nd, 2008, 04:45 PM
jlm5419 jlm5419 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Location: Out West
Posts: 29 jlm5419 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 26 sec
Reputation Power: 0
Formatting the text box

The easiest way is to select the text box for the password (in design mode, obviously) and select a font from the toolbar at the top. Alternately, you can right-click on the text box and select "properties" to bring up a whole host of possibilities, including changing the font style, size, border, etc. You could also make the font size 1 pt, which is too small to be seen.

As for using a table for passwords, selecting "Password" for data type will give you the effect you want for the text. How to call it from the form, I dunno. It's one of those things I'm working on myself.

Reply With Quote
  #6  
Old December 3rd, 2008, 10:18 AM
AlanSidman's Avatar
AlanSidman AlanSidman is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2008
Location: Lake County, IL
Posts: 139 AlanSidman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 36 m 14 sec
Reputation Power: 1
In your text box for your password, right click to open the properties. On the data tab, select format, at the far right of the box, click on the drop down, and select password. All characters will now be populated with asterisks as you key in the password. If password is not an option, customize it.

(This can also be set using format in the table if there is an underlying bound table.)

Reply With Quote
  #7  
Old December 3rd, 2008, 11:49 AM
jlm5419 jlm5419 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Location: Out West
Posts: 29 jlm5419 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 26 sec
Reputation Power: 0
Excellent, Alan! Thank you.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Password with Asterisk


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
Stay green...Green IT