Solved

Dealing with Case sensitivity in MS Access

Posted on 2013-01-08
4
261 Views
Last Modified: 2013-01-08
Good morning,

I have a series of table which I need to incorporate into a MS Access DB.  The unique key in the source tables are from a DB structure where case is also considered so, where my source data defines 12345AB and 12345Ab as unique records, MS access states these are duplicates.

Any suggestions on how to tell MS Access that these are indeed to different records?
0
Comment
Question by:MCaliebe
4 Comments
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 75 total points
ID: 38755377
you can try using the strComp(s1,s2,vbBinarycompare)  function

?strcomp("12345AB","12345Ab",vbBinaryCompare)
-1
meaning string1 is less than string2
or

?strcomp("12345Ab","12345AB",vbBinaryCompare)
 1
meaning string1 is greater than string2
0
 
LVL 77

Accepted Solution

by:
peter57r earned 125 total points
ID: 38755443
There is no way that I know of to store case-sensitive key values- Access is intrinsically case insensitive except where coding is used to specify case-sensitive comparisons..
To store such values I think you would need to introduce a new primary key field and use the existing key values as data.
0
 

Author Closing Comment

by:MCaliebe
ID: 38755957
Points awarded to both answers as they are both correct.  A function can be used to determine differences in a field as related to CASE, however as this item is to be used as a KEY value, MS Access won't function to differentiate based on case.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 38756031
A function can be used to determine differences in a field as related to CASE, however as this item is to be used as a KEY value, MS Access won't function to differentiate based on case.

Depends on what type of key you mean.  If you mean as a primary key, the above is correct.

As a join key, it could work, as cap1 demonstrated:

SELECT *
FROM tbl1, tbl2
WHERE StrComp(tbl1.ID, tb2.ID, 0) = 0

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to put password on a button in Access 2013 4 40
Auto Filter in Combo Box 7 30
VBA pass value between two fields different tables 10 37
Sub Reports 8 21
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

930 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

8 Experts available now in Live!

Get 1:1 Help Now