Microsoft Office 2000/Visual Basic Programmer's Guide |
The Option Compare statement determines how strings are compared within a module. There are three settings for the Option Compare statement:
Important If you're writing code in Access that you may want to export to another VBA host application, you should explicitly specify string comparisons as binary or text-based in the line that performs the comparison. Because the Option Compare Database setting is available only in Access, the code will not compile when you import it into another application unless you remove this setting. If you have explicitly specified the string-comparison method for each line that performs comparisons, you can export the code and be confident that string comparisons will continue to work as expected after you remove the Option Compare Database setting.
Tip To change the sort order for a database, click Options on the Tools menu, click the General tab, and then change the New Database Sort Order setting. After you change this setting, any new database you create will perform text comparisons based on the new sort order; changing this option has no effect on existing databases.