Solved

Access 2007 - What does "Option Compare Database" mean?

Posted on 2010-08-25
3
5,586 Views
Last Modified: 2013-11-28
Experts,

What does "Option Compare Database" mean? Are there other "options" I should know about as a beginner programmer, to insert at the beginning of my code?
0
Comment
Question by:JC_Lives
3 Comments
 
LVL 13

Assisted Solution

by:Surone1
Surone1 earned 250 total points
ID: 33522173
0
 
LVL 77

Accepted Solution

by:
peter57r earned 250 total points
ID: 33522231
Option Compare Database indicates which collation sequence (sort order rules) to be used.
In essence it creates a case-Insensitive operation for text comparisons which is the norm throughout Access.

You can use Option Compare Binary instead which would create case-sensitive text comparisons for operations in that module.

You should use the Tools>Options settings in the VBA window and check the setting which says "Require Variable Declaration".
This will add another statement at the top of each module you subsequently crreate which says
Option Explicit
This option prevents you from using variables which have not been declared explicitly and so is a significant aid in preventing mis-spellings of variables used in code..

0
 

Author Closing Comment

by:JC_Lives
ID: 33522291
Cool people!! Thanks!!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question