Results 1 to 6 of 6

Thread: Passwords

  1. #1
    Join Date
    Dec 2005
    Posts
    11

    Unanswered: Passwords

    Hi again,

    Also im using passwords for the administrator to enter the databases.
    on the admin form the admin guy can enter his password and number.
    I have an admin table containing a password and admin number.

    whats the code behind having a password prompt pop up when the admin clicks the "cmdadmin" button on the opening form.

    Cheers.

  2. #2
    Join Date
    Sep 2005
    Location
    Utah
    Posts
    136
    Create an unbound form and enter the below code for the command button.


    Dim strPassword

    strPassword = Me.ControlName

    If strPassword = "" Or strPassword = Empty Then
    MsgBox "You do not have rights to access this menu."
    Exit Sub
    End If

    If strPassword = "PasswordName" Then
    DoCmd.OpenForm "FormName", acNormal
    Else
    MsgBox "Sorry, you do not have access to this form"
    Exit Sub

    End If

    DoCmd.Close acForm, "PasswordFormName"

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Be careful with this. When your admin code is stored in the database, you now have to protect the database as well. You may want to consider compiling to an mde and disabling the allowbypasskey setting.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  4. #4
    Join Date
    Sep 2005
    Location
    Utah
    Posts
    136
    Thanks, for the heads up on this.

  5. #5
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Teddy
    Be careful with this. When your admin code is stored in the database, you now have to protect the database as well. You may want to consider compiling to an mde and disabling the allowbypasskey setting.
    Public Const EE_TmpText = "t7W9dERV0hu0weR5Dz4Yjh9Owd77lS04VbX7i3HandelMozar tBachBeethovenBrahmsVivaldi"

    Can you find the password in here????
    Back to Access ... ADO is not the way to go for speed ...

  6. #6
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    No, but I can pop into VBE and find out how you're pulling it. Unless you're doing something obnoxious like leveraging CAPICOM, in which case you would be sophisticated enough to safely ignore my warning.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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