Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Password question (Access 2000)

    If an Input mask is on a PWord field of PASSWORD, can I express that the user must type 8 or more characters for a password as well, and nothing less? How!

    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Password question (Access 2000)

    That would have to be done as a data validation process. You can force a specific number of characters using an Input Mask, but when you set the Input Mask to Password, you loose the capability to do that. So use a Len() function to check for at least 8 characters.
    Wendell

  3. #3
    5 Star Lounger
    Join Date
    Jul 2004
    Location
    Ohio
    Posts
    629
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password question (Access 2000)

    if you have a login type screen where the user clicks a "Login" button, or something like that, you can put in some code to check the length.

    if (len(pword)<=8) then
    msgbox "Your password must be atleast 8 characters in length!"
    exit sub
    end if

    where pword is a textbox, then continue the logon process
    <img src=/w3timages/blueline.gif width=33% height=2>
    <big>John</big>

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Password question (Access 2000)

    You can set the Validation Rule property of the field or text box:

    Len([NameOfField])>7

    and enter a warning text in the Validation Text property, for example

    The password must be at least 8 characters in length.

    Alternatively, you can use the Before Update event of the text box used to enter the password, and cancel the update if the entry is too short:

    Private Sub txtPassword_BeforeUpdate(Cancel As Integer)
    If Len(Me.txtPassword) < 8 Then
    MsgBox "The Password must be at least 8 characters in length!", vbExclamation
    Cancel = True
    End If
    End Sub

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password question (Access 2000)

    Thank you everyone! You guys are so fasssstttt!

    Hans*** the Len([Pword])>7 was what we needed to make it work...however all the other answers intrigued me so will be looking at them all over time.

    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •