These functions were new in VBA 6. One of their arguments is a Compare parameter. This parameter can take the values vbBinaryCompare (compare characters' binary representations), vbTextCompare (compare characters' text), vbDatabaseCompare (for Access only, compare using settings in the database), or vbUseCompareOption (use the setting in the Option Compare statement).
You can also specify an LCID to use a language's comparison method (if the language is supported on your system).
Unfortunately the constant vbDatabaseCompare has value 2, which is also the LCID for Bulgarian. In Access 2000, if you don't specify a Compare parameter and the file contains an "Option Compare Database" statement, then VBA tries to perform comparisons in Bulgarian. If your system doesn't happen to support Bulgarian, you can get an "Invalid procedure call or argument" error.
The solution is to explicitly set the Compare parameter to either vbBinaryCompare, vbBinaryText, or an LCID.
|