Creating Ref numbers from two fields

5 pts.
Tags:
Access Database
Microsoft Access
Microsoft Access Unique ID
I want to create an ID code from the first 3 letters of a surname in the surname filed and combine it with a 3 digit number to create a unique ID code. Appreciate it if anyone could tell me how this is done in Access.

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’m not really good at Access but as far as I know triggers are not available in Access but anyway you may use Form events to grab the first three digits with something like MYCODE = LEFT(FIRSTNAME,3) + LEFT(LASTNAME,3)

I strongly suggest you adding more “items” for this ID otherwise it will surely happen that you end up with duplicate IDs.
Another suggestion is to move to SQL Express where you have tons of options and a more professional way of doing things.
Regards.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following