Results 1 to 2 of 2

Thread: Password

  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Password

    My secure database does not have the full set of menus. I want to distributed the database with a generic password for all users. How does each user change the password if the menu choices are not available. Can I use a button on the first form to do this? - if so can somebody help me with the code please.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Password

    Hi,
    I haven't tested this but I think it should work:
    Sub NewPassword()
    Dim wrkDefault As Workspace
    Dim usrCurrent As User
    Dim strOldPass As String, strNewPass As String
    Set wrkDefault = DBEngine.Workspaces(0)
    Set usrCurrent = wrkDefault.Users(Application.CurrentUser)
    strOldPass = InputBox("Please enter current password")
    strNewPass = InputBox("Please enter new password")
    usrCurrent.NewPassword strOldPass, strNewPass
    Set usrCurrent = Nothing
    Set wrkDefault = Nothing
    End Sub
    Hope that helps - any probs let me know.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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