Results 1 to 5 of 5
  1. #1
    Join Date
    May 2012
    Posts
    132

    Unanswered: password protected form

    can we make a form to prompt for a password before opening so that only the ones who know the password can open and use that form?
    thank you
    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    yes
    but why?
    I'd strongly recommend that you use the network API logon (google dev ashish api), so that means the user is authenticated by their network logon. enforce one network logon per user, enforce one network logon active at any one time. install policies that mean a user must not leave their computer unattended and unloicked.

    I don't know what versions of Access you are using, but prior to V2007 they used to use the workgroup security model. add the network logons to the workgroup file
    then using the ADO security extensiuons
    query the workgroup file to find what permissions network logon user has and take action accordingly
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2012
    Posts
    132
    i am not familiar with tiny basics of a network.
    The user is using V2010, but i need him not to be able to open some forms. for example a form on which some kind of reports can be made, while he is not authorized to view those reports. BTW is it possible to make the form pass protected while not being involved in network issues?
    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    I asked god to please give me everything to enjoy the life, God said: i gave you the life to enjoy everything.

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    is this user running on a network?
    if so using the network authentication in my books is the way to go
    if its a stand alone computer with multple user accounts then the network API is still the right way to go
    if they are not an a network AND a single user account with multiple users then you'll have to do something else AND it will not be anywhere near as effective as the network API.
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jul 2013
    Posts
    46
    Try this in the On Open event and change "password" to whatever you want:

    Private Sub Form_Open(Cancel As Integer)
    Dim PassWord As String

    PassWord = InputBox("Enter Administrator Password")
    Cancel = (PassWord <> "password")

    If Cancel Then MsgBox ("You are not authorized for Administrator access.")
    End Sub

    ***********************

    Good luck with your project,
    Bill

Posting Permissions

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