Results 1 to 2 of 2
  1. #1
    dgj32784 is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    22

    Make Input Box Value Case Sensitive & Hide Characters That Are Inputted

    I have a command button control hidden on a main form screen that will unhide the Access window, ribbon, and command bars that are set to be hidden on form open (the main form is set to be default on dbase open). My questions are: 1) Can I make the "Passw0rd" case sensitive? It currently works with either an uppercase "P" or lowercase "p". 2) Can I disguise the characters entered into the input box (i.e., ********, etc.)? I can currently see the text "Passw0rd" as it is typed into the input box.



    Code:
     
    Private Sub cmdShowHidden_Click()
    'Declare variable for input box value
    Dim strResponse As String
    'Specify input box prompt
    strResponse = InputBox("If you are seeing this message box and do not understand why, press Cancel." & vbCrLf & vbCrLf & "Otherwise, enter the password and press OK.")
    'Sets input box response to given password
    If strResponse = "Passw0rd" Then
    'Show database window
    DoCmd.SelectObject acTable, , True
    'Show the ribbon
    DoCmd.ShowToolbar "Ribbon", acToolbarYes
    'Show the menus and toolbars
    Dim intCommandBars As Integer
    For intCommandBar = 1 To CommandBars.Count
    CommandBars(intCommandBar).Enabled = True
    Next intCommandBar
    Else: Exit Sub
    End If
    End Sub
    Also, if anyone knows of a more elegant way to achieve the window, ribbon, and command bars hide operation, please share. FYI - I have another hidden command button to re-hide these components if they have been unhidden by a dbase administrator.

    Thanks in advance,
    David

  2. #2
    ketbdnetbp is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Midwest
    Posts
    254

    Mask Input Box

    I haven't seen that it is possible to mask that which is being typed into an input box. Others have suggested a popup unbound modal form with an unbound textbox and a cancel button to accomplish this. Set the input mask property of the textbox to password, then perform logic test on the results in an after update event of the textbox, if boolean = true then, run the rest of your code.

    Further, I haven't tried this but, I think it may be possible to check the case of a character by using it's ASCII equivalent.

    Something to consider....

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Input Mask characters stripped from table to table
    By svcghost in forum Import/Export Data
    Replies: 2
    Last Post: 12-01-2010, 10:01 AM
  2. F1 Context sensitive help in Access 2002
    By NOTLguy in forum Programming
    Replies: 6
    Last Post: 10-25-2010, 02:50 PM
  3. Time sensitive data
    By ViRi in forum Forms
    Replies: 3
    Last Post: 02-27-2010, 01:04 AM
  4. Converting all text input to lower case
    By aommaster in forum Forms
    Replies: 6
    Last Post: 08-05-2009, 05:43 AM
  5. is access case-sensitive?
    By pen in forum Programming
    Replies: 1
    Last Post: 04-07-2009, 05:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums