Using MS Access/Autonumber Alphanumeric



I have this database I'm working on and I want the Primary No. to be generated as eg. POIN-IN-01234. Can this be done using any kind of code? If so can you send me the code?

ANSWER: It's possible, but it will require some programming. START HERE.

Be sure to visit my web site and watch my FREE 2-hour-long Microsoft Access Video Tutorial

Richard Rost
599CD Computer Training

---------- FOLLOW-UP ----------

QUESTION: Hi again,

Thanks for your response, but I think I did not explain myself clearly. What I really wanted was a way, if there's one, to auto-generate an alphanumeric number with a prefix like in [POIN-IN-01234]. The numeric part should be incremented but the prefix remains constant for each new ID. Can this be done?

Thanks again.

You can use an AutoNumber which starts at 1 and counts up. If you then want to use a query to add some kind of an alphanumeric prefix, you can certainly do that, but Access will not do this WITHOUT some programming or at least some query/form concatenation. Access will not do this by itself.

The bigger question is WHY do you need to do this? Are you trying to maintain some kind of consistency with an older paper system?

Using MS Access

All Answers

Answers by Expert:

Ask Experts


Richard Rost


I am happy to answer any kinds of questions about Microsoft Access - from basic table design to advanced VBA programming. Also, please feel free to check the Access Tips & Tricks section of my web site, and free Access 101 tutorial.


I am the president of and I specialize in Microsoft Access Tutorials. I have been teaching Access in the classroom since 1994, and online since 2002.

I am a self-taught Access expert. I have been building databases for clients since the early 90s. You can see a sample of my Access Tutorials on my web site at

©2017 All rights reserved.