Solved

ms acceess InputBox help

Posted on 2011-03-07
5
280 Views
Last Modified: 2012-06-21
Below is a code i am using, what i want is the password to be in caps. and the InputBox to auto use caps as the user type in the password? also problem with the formating is it shows the password as it is type is there a way to mask this using a InputBox so as i type the password is would show *****?
Private Sub START_TIME_GotFocus()
Dim strPasswd

   strPasswd = InputBox("Please Enter Admin Password", "Start Time is Restricted")

   'Check to see if there is any entry made to input box, or if
   'cancel button is pressed. If no entry made then exit sub.

   If strPasswd = "" Or strPasswd = Empty Then
       MsgBox "No Password Provided", vbInformation, "Password Required"
       Exit Sub
   End If

   'If correct password is entered unlock Start_Time
   'If incorrect password entered give message and exit sub

   If strPasswd = "JAX" Then
       Me.START_TIME.Locked = False
   Else
       MsgBox "Sorry, you do not have access to the start time", vbOKOnly, "Password Incorrect!"
       Exit Sub
   End If
End Sub

Open in new window

0
Comment
Question by:Blueice13085
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 35065731
< is there a way to mask this using a InputBox so as i type the password is would show *****?
>

If your field is bound in a table, you can type the Input mask property of the field the text "Password" on it (without a quote).

Sincerely,
Ed
0
 
LVL 19

Expert Comment

by:MINDSUPERB
ID: 35065739
If the field is unbound, in the input mask on the data tab of the field property, type "Password" on it (without a quote).

Ed
0
 
LVL 19

Accepted Solution

by:
MINDSUPERB earned 500 total points
ID: 35065756
On the after event of the password field, put this code:

Me.Password = UCase(Me.Password)

Note: I assume that Password is the name of your field.

Ed
0
 

Author Comment

by:Blueice13085
ID: 35068542
If strPasswd = "JAX" Then
is where the password is
0
 

Author Comment

by:Blueice13085
ID: 35068632
i got how the Ucase would work in my code

Private Sub START_TIME_GotFocus()
Dim strPasswd

   [b]strPasswd = UCase(InputBox("Please Enter Admin Password", "Start Time is Restricted"))[/b]

   'Check to see if there is any entry made to input box, or if
   'cancel button is pressed. If no entry made then exit sub.

   If strPasswd = "" Or strPasswd = Empty Then
       MsgBox "No Password Provided", vbInformation, "Password Required"
       Exit Sub
   End If

   'If correct password is entered unlock Start_Time
   'If incorrect password entered give message and exit sub

   If strPasswd = "JAX" Then
       Me.START_TIME.Locked = False
   Else
       MsgBox "Sorry, you do not have access to the start time", vbOKOnly, "Password Incorrect!"
       Exit Sub
   End If
End Sub

Open in new window

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question