Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

make key field case sensitive?

Posted on 2002-03-11
7
Medium Priority
?
287 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 280 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
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

Technology Partners: 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!

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

715 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