Solved

make key field case sensitive?

Posted on 2002-03-11
7
275 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

734 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