Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Nov 2002
    Location
    Monroeville, Pennsylvania, USA
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Password access (2002)

    I have two databases built. #1 is accessable to all. #2 is password protected. ( Financial Information ) I have a command button to open #2 from #1. It doesn't allow me to open #2 because of the requirement for a password. Is there any way around this problem?

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

    Re: Password access (2002)

    What code are you using to open the other database?

  3. #3
    2 Star Lounger
    Join Date
    Nov 2002
    Location
    Monroeville, Pennsylvania, USA
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password access (2002)

    Private Sub Command106_Click()
    On Error GoTo Err_Command106_Click

    Dim stAppName As String

    stAppName = "Cocuments and SettingsDadMy DocumentsSales Information.mdb"
    Call Shell(stAppName, 1)

    Exit_Command106_Click:
    Exit Sub

    Err_Command106_Click:
    MsgBox Err.Description
    Resume Exit_Command106_Click

    End Sub


    All I Get is an error message "Invalid Procedure call or argument"

  4. #4
    2 Star Lounger
    Join Date
    Nov 2002
    Location
    Monroeville, Pennsylvania, USA
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password access (2002)

    Will that code require the user to input the password, or will it automatically open the file without any further prompt? I need it to require an input

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

    Re: Password access (2002)

    Shell doesn't work that way, you must specify the application to be started, plus the command line option needed. The double double quotes in the code below are needed to include quotes within the quoted string.
    <code>
    stAppName = """C:Program FilesMicrosoft OfficeOffice10MSAccess.exe"" " & _
    """Cocuments and SettingsDadMy DocumentsSales Information.mdb"" /pwd terceS"
    </code>

    where terceS is the password.

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

    Re: Password access (2002)

    Omit the password from the instruction (there was a mistake in my previous reply, now corrected):
    <code>
    stAppName = """C:Program FilesMicrosoft OfficeOffice10MSAccess.exe"" " & _
    """Cocuments and SettingsDadMy DocumentsSales Information.mdb"""
    </code>
    The user will be prompted for the password.

Posting Permissions

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