How to add password to 1 button on switchboard

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zoey Elizabeth

    #1

    How to add password to 1 button on switchboard

    Problem - MSAccess, 2007, trying to add password to 1 button on switchboard:

    Okay Ive been trying to make the above code (posted by Hardcode) work for me to make 1 button on my main switchboard require a password to reach the second switchboard (admin functions). By using the switchboard editor I told the button's function to 'run code' and the name of the code in VB is simply module1 (as fa as I know) Ive got the code into VB, and saved it in a module... but when I click the button I get a message "The object doesn't contain the automation object 'module1.'" Am I oversimplifying here and forgetting some assumed step that coders know (I have never had any experience with VB)?
  • malcolmk
    New Member
    • Sep 2010
    • 79

    #2
    password switchboard button

    Just modify the switchboard button event handler as in the attached file.
    Attached Files

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      Hello malcolmk. Unless I am mistaken, the problem is a little more complicated than this in that the OP wishes to Open another Cascading Switchboard as opposed to a Standard Form. No matter how many Switchboards you have, there is still only a single, dynamically configured Switchboard. I am probably wrong, but only the OP can clarify this issue.

      Comment

      • malcolmk
        New Member
        • Sep 2010
        • 79

        #4
        password switchboard button

        Ok I get what you are saying but the procedure is the same using real switchboards, modify the onclick to an event.
        The event asks for a password and if correct continues to call the HandleButtonCli ck() procedure. I have attached a modified example. Hope this is what you are looking for.
        password is still letmein
        Attached Files
        Last edited by malcolmk; Nov 13 '10, 09:28 PM. Reason: clarification of modification after reading post below by ADezii

        Comment

        • ADezii
          Recognized Expert Expert
          • Apr 2006
          • 8834

          #5
          If you are using Multiple Switchboards (True Switchboards, not Standard Forms), the Click() Event calls the HandleButtonCli ck() Procedure passing to it the Number of the Button clicked since this is constantly changing. I'll Attach a Demo as soon as I get a chance to illustrate my point. OK, got a chance to through together a really lousy Demo, see Attached. I put together a Demo for you in Record Time, it is attached.
          Attached Files

          Comment

          • malcolmk
            New Member
            • Sep 2010
            • 79

            #6
            Downloaded sample ADezii but on my system it simply demos switchboard navigation with no request for password?
            !

            Comment

            • ADezii
              Recognized Expert Expert
              • Apr 2006
              • 8834

              #7
              The Attachment was just to illustrate Multiple Switchboards and how they interact and to also show how the Click() Event of the Command Buttons on a Switchboard cannot be used to verify Passwords.

              Comment

              Working...