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
Solved

Dealing with Case sensitivity in MS Access

Posted on 2013-01-08
4
263 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 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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…
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.
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…

809 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