[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

make key field case sensitive?

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
yitz99
Asked:
yitz99
  • 3
  • 3
1 Solution
 
marcoszorrillaCommented:
In the onUpdate event write this code:

MyField=Ucase([MyField])

then you obtain only FRED
0
 
nico5038Commented:
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
 
yitz99Author Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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

Nic;o)
0
 
yitz99Author Commented:
I wanted to input directly to the table without a form and without code.
0
 
yitz99Author Commented:
I wanted to input directly to the table without a form and without code.
0
 
nico5038Commented:
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

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now