• Case sensitive password (Access 2000>)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Case sensitive password (Access 2000>)

    Author
    Topic
    #410408

    Could anyone assist me in making the password Case Sensitive in the “PassDialogForm”. The current password is “pass”, but can be typed “PASS”, “Pass”, “PAss”…you get what I mean. I would like it to only accept “Pass”. Thanx in advance!

    Viewing 3 reply threads
    Author
    Replies
    • #881808

      Change the first line of the module for the password form from

      Option Compare Database

      to

      Option Compare Binary

      This will force string comparisons for that module to be exact. Look up ‘Compare’ in the online help for more info.

      • #881865

        Thanx… I’ll give both bits of advice some try and see what is useful for this DB.
        It is useful to know both ways. The first is quick but will affect the entire module… the other is great only for that sub procedure if I understand it correctly.
        thanx again…

        • #881871

          Correct. My suggestion affects the entire module. If you only have one procedure in the module that compares strings, it is a quick solution. If you have multiple string comparisons in a module, some of which should be case sensitive, while others shouldn’t, Jayden’s solution is the way to go.

        • #881872

          Correct. My suggestion affects the entire module. If you only have one procedure in the module that compares strings, it is a quick solution. If you have multiple string comparisons in a module, some of which should be case sensitive, while others shouldn’t, Jayden’s solution is the way to go.

      • #881866

        Thanx… I’ll give both bits of advice some try and see what is useful for this DB.
        It is useful to know both ways. The first is quick but will affect the entire module… the other is great only for that sub procedure if I understand it correctly.
        thanx again…

    • #881809

      Change the first line of the module for the password form from

      Option Compare Database

      to

      Option Compare Binary

      This will force string comparisons for that module to be exact. Look up ‘Compare’ in the online help for more info.

    • #881843

      I also like using the StrComp function.

      This takes the argumes StrComp(String1,String2, [compare method]). The compare method you can set to compare binary (vbBinaryCompare)

      The reason I like this, is that you don’t have to worry about other ‘binary’ comparisons (the less common) through the rest of the module, as you do when you set the whole module to Binary comparisons. But it is only a preference thing.

      Cheers

      Jayden

    • #881844

      I also like using the StrComp function.

      This takes the argumes StrComp(String1,String2, [compare method]). The compare method you can set to compare binary (vbBinaryCompare)

      The reason I like this, is that you don’t have to worry about other ‘binary’ comparisons (the less common) through the rest of the module, as you do when you set the whole module to Binary comparisons. But it is only a preference thing.

      Cheers

      Jayden

    Viewing 3 reply threads
    Reply To: Case sensitive password (Access 2000>)

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

    Your information: