Solved

make key field case sensitive?

Posted on 2002-03-11
7
280 Views
Last Modified: 2006-11-17
I've got a text field that I want to use as the primary key, but it has to be case sensitive.  That is, it has to allow for three recordes with key fields:
fred
Fred
FRED

How do you tweak the index to do this?
0
Comment
Question by:yitz99
[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
  • 3
7 Comments
 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 6855826
In the onUpdate event write this code:

MyField=Ucase([MyField])

then you obtain only FRED
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 70 total points
ID: 6855835
The only way will be to add a "hidden" key and transform the original field into it's ASCII values.
You could use a function like:

Function fncASCII(strInput As String) As String
Dim intI As Integer

For intI = 1 To Len(strInput)
fncASCII = fncASCII & Right("000" & Asc(Mid(strInput,intI, 1)), 3)
Next intI

End Function

Clear ?

Nic;o)
0
 
LVL 1

Author Comment

by:yitz99
ID: 6855838
Thanks Nico.  The answer is clear enough, although it isn't what I wanted to hear.

Are you in my time zone (gmt +2), or are you a night owl?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 54

Expert Comment

by:nico5038
ID: 6855844
I'm from The Netherlands (at gmt+1).
You made me curious, what's the way you want to go ?

Nic;o)
0
 
LVL 1

Author Comment

by:yitz99
ID: 6855903
I wanted to input directly to the table without a form and without code.
0
 
LVL 1

Author Comment

by:yitz99
ID: 6855915
I wanted to input directly to the table without a form and without code.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 6856078
That's not possible with access, but when you also have MS SQL then you could create a table with a StoredProcedure that performs a function like this automatically when inserting/updating a row.

Nic;o)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

623 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