Solved

make key field case sensitive?

Posted on 2002-03-11
7
249 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
  • 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HasData 9 38
Access query with left expression 9 32
MS Access Order Smallest to Biggest Query Help 13 43
field number type in access tabledefs fields 5 20
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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…

863 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

23 Experts available now in Live!

Get 1:1 Help Now