Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open a form with password (Access 2000)

    I have a form that has a password called "Mypass". I want to write a code in the autoexec module opening the form
    but i cannot build it. The code i have written is the following

    Dim db As CurrentDb
    Set db = dbDriverComplete, False, "; PWD=" & StrPassword
    DoCmd.OpenForm "frmUni", acNormal, "", "", , acNormal

    I cannt open the form,possibly due to a wrong line in the above code
    May i have some help?

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

    Re: Open a form with password (Access 2000)

    What do you mean by "a form that has a password"? You can set a password on a database. or set user-level security so that the user will have to log in to the database with a valid user name and password, but there is no built-in password option for forms. Did you create one yourself?

    The first two lines of your code don't make any sense at all, so I don't know what you are trying to do there.

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open a form with password (Access 2000)

    i am trying to open a form that has already a password.I want to point out the pasword for example
    Dim StrPassowrd as string
    StrPassword = " MYPassword"
    DoCmd.OpenForm , MyPassword
    or something like that.I have been told that the OpenForm command contains this posibility

    Is it possile ?

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

    Re: Open a form with password (Access 2000)

    I repeat, Access has no built-in password protection for forms. Hence, DoCmd.OpenForm does not have a password argument.

    It is possible that the person who created the form put some kind of password check into the code behind the form, but without seeing that code it is impossible to tell how it has been done. You could post the code here, but that may not be desirable.

  5. #5
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Leuven, Vlaanderen, Belgium
    Posts
    322
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Re: Open a form with password (Access 2000)

    Could it be that the password mentioned here refers to some password system Markus has designed himself and that the problem is situated elsewhere... (!?)

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

    Re: Open a form with password (Access 2000)

    That's what I'm trying to find out by asking questions...

Posting Permissions

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