• Example Code? (XP)

    Author
    Topic
    #414826

    Could someone post a short (but expandable) example of the code I would attach to a text box/command button that depending on what password is entered in the box, it directs you to a specific form? I’ve got an If Then attached to the cmd button that looks at the word in the text box, however when I try to add another If Then, it will only go to the default (blank text box) error message.

    Viewing 1 reply thread
    Author
    Replies
    • #923428

      Why don’t you post the code you’re trying? Then one of us can suggest how to fix it. That would mean more to you than an abstract example.

    • #923429

      You should be better with a Select case instead of different If Then Else
      Select Case Me.txtPasswordTextBox
      Case “ABC”
      Docmd.OpenForm “ABC”
      Case “DEF”
      Docmd.OpenForm “DEF”
      Case Else
      MsgBox “Wrong Password”
      Application.Quit
      End Select

    Viewing 1 reply thread
    Reply To: Example Code? (XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: