Results 1 to 3 of 3
  1. #1
    accessnewb is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York, NY
    Posts
    116

    Problem with Match case

    Hi,
    I have a password change form in which the user will enter the old password, the new password and the confirm new password. The code works fine, but the only problem is even if the new password and the confirm new password cases are different it will still accept it.

    For example, if the new password is "password123". In the new password field I enter "PASSword123" and in the confirm new password field I enter "passWORD123", then it still accepts it and changes the password in the database.

    The particular line of code is:

    If Me.txtNewPass.Value = Me.txtConfirmPass.Value Then
    blah blah

    I know that there is a function called matchcase(). But I am not sure how to use it. I couldn't find anything useful online



    Any thoughts????

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Actually it is strComp that you want.

    Code:
    If strComp(Me.txtNewPass, Me.txtConfirmPass, vbBinaryCompare)= 0 Then
    It equals 0 if it matches

  3. #3
    accessnewb is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York, NY
    Posts
    116
    Thanks! It works

Please reply to this thread with any new information or opinions.

Similar Threads

  1. CASE STATEMENT or IF-ELSE-THEN? HELP
    By Shakenaw in forum Access
    Replies: 9
    Last Post: 06-08-2015, 11:24 AM
  2. Print ONE particular case
    By lyndon.pace in forum Programming
    Replies: 2
    Last Post: 04-11-2011, 07:53 AM
  3. Replies: 1
    Last Post: 11-05-2010, 04:51 AM
  4. Use Case Scenarios
    By scott.weppler in forum Access
    Replies: 0
    Last Post: 05-31-2009, 12:15 PM
  5. is access case-sensitive?
    By pen in forum Programming
    Replies: 1
    Last Post: 04-07-2009, 05:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums