Returns a value indicating the result of a string comparison.
StrComp(string1, string2[, compare])The StrComp function syntax has these arguments:
Part Descriptionstring1 Required. Any valid string expression.string2 Required. Any valid string expression.compare Optional. Numeric value indicating the kind of comparison to use when evaluating strings. If omitted, a binary comparison is performed. See Settings section for values.
The compare argument can have the following values:
Constant Value DescriptionvbBinaryCompare 0 Perform a binary comparison.vbTextCompare 1 Perform a textual comparison.vbDatabaseCompare 2 Perform a comparison based upon information contained in the database where the comparison is to be performed.
If StrComp returnsstring1 is less than string2 -1string1 is equal to string2 0string1 is greater than string2 1string1 or string2 is Null Null
.