Solved

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

Posted on 2010-08-25
3
5,946 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Many to Many From without subform 11 45
SSMA Access BE Linked Table Migration Linking Issue 2 41
Database maintenance 36 108
Runtime Error -2147467259 (80004005) 7 50
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

733 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