Password for subform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SeadooRider
    New Member
    • Jan 2013
    • 48

    Password for subform

    I have a form that has a toggle button to make visable a subform. In order to open the subform the user must proved a password. However, the part that isn't working correctly is that the password box comes up when the user toggles to close or make invisable the subform. The user can click "ok" or "cancel" and the subform goes away.
    How can I keep the password box from appearing when the user wants to close the subform with the toggle button.

    See code:

    Code:
    Private Sub tglPOCupdate_click()
    dim PassWord As String
    PassWord = InputBox("enter Password")
    If tglPOCupdate = True and Password = "xxxxx" then
    [frmUpdatePOCs].visable = True
    Else
    If tglPOCupdate = False then
    [frmUpdatePOCs].visable = False
    End If
    end If
    End sub
    thx,
    Jason
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Ask for and check the password only when the toggle is true.

    Comment

    Working...