Solved

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

Posted on 2010-08-25
3
4,522 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
Comment Utility
0
 
LVL 77

Accepted Solution

by:
peter57r earned 250 total points
Comment Utility
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
Comment Utility
Cool people!! Thanks!!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now