# Access 2007 Custom Primary Key



## DemonDriverDan (Dec 15, 2009)

Hi guys, this is my problem:

I'm writing a DB and have a Helper table (just info on helpers at a charity event).

However I want the HelperID to be a custom key, (e.g first 3 letters of surname, 2nd letter forename etc).

Is there anyway to get Access to do this for me? (Obv it would have to be automatically entered at the end, potentially on a button)

Dan


----------



## OBP (Mar 8, 2005)

Dan, welcome to the Forum.
This can be done using VBA on the Data entry Form. for each new Record, there is one pitfall with what you want to do and that is when someone miss-spells the name and goes back and changes it.
Do you VBA code to change the key to the new spelling?


----------



## DemonDriverDan (Dec 15, 2009)

I could do it that way, hadn't thought of it.

Also, do you now any good resources for working with users?

Dan


----------



## OBP (Mar 8, 2005)

I am not sure what you mean by "resources for working with users"?

If you need any help with the VBA for the custom key field just let me know, I have worked on quite a few different variations.


----------

