I have a question about Case sensitive string comparisons...
I have a form with a text box called OldPWD that I entered "Test" into and with the code below I am
comparing this to "test" and the result is 0 which indicates that they are equal.
If I enter "TEST" (all caps) into the OldPWD text box then I get a result of -1
I am getting the impression that the strComp function can only compare case sensitivity text
as either fully upper case versus fully lower case...
I first tried " If OldPWD <> "test" and that compare also resulted in True...
Is there a way to test for any differences in case sensitive letters between two strings.
thanks
I have a form with a text box called OldPWD that I entered "Test" into and with the code below I am
comparing this to "test" and the result is 0 which indicates that they are equal.
If I enter "TEST" (all caps) into the OldPWD text box then I get a result of -1
I am getting the impression that the strComp function can only compare case sensitivity text
as either fully upper case versus fully lower case...
I first tried " If OldPWD <> "test" and that compare also resulted in True...
Is there a way to test for any differences in case sensitive letters between two strings.
Code:
Private Sub Command3_Click()
Dim stcmp As Integer
stcmp = StrComp(Me.OldPWD, "test", 0)
End Sub
thanks