Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Case sensitive password (Access 2000>)

    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!
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Case sensitive password (Access 2000>)

    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.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Case sensitive password (Access 2000>)

    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

  4. #4
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Case sensitive password (Access 2000>)

    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...
    Regards,
    Rudi

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Case sensitive password (Access 2000>)

    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.

Posting Permissions

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