Results 1 to 3 of 3
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365

    Using strComp

    These return False.


    Code:
    isSame = StrComp("TeSt", "TeSt", vbTextCompare)
    isSame = StrComp("TeSt", "TeSt", vbBinaryCompare)
    I believe TextCompare is case-insensitive and Binary case sensitive.
    Why don't they return True as they are the same ?

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    The strcomp does not return a Boolean it returns an integer value-1,0 or 1.

    if they are equal it returns 0. the 1or-1 is returned if one value is greater or less than the other

    See this link
    https://support.microsoft.com/en-us/...9-f7442bc10b96

  3. #3
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    365
    Thanks very much, I had that totally wrong!

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

Similar Threads

  1. StrComp causing "Invalid use of Null" error
    By sephiroth2906 in forum Programming
    Replies: 5
    Last Post: 09-15-2011, 07:06 PM

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