You are here:

Using MS Access/Access Alphanumeric sequence


I have a table with 4 column, AutoID, MediaID, MediaType and Description. The AutoID is PK and autonumber, the MediaID is numeric field and Mediatype and Description are text field. I have a Form with the 4 fields and one button. The user only needs to select the media type (that is a combo box with 3 different media type CD, BD, DVD) and enter a description of the media. The Media ID will be populated when the user click the button. The media ID need to be a incremental sequence depending of the media type. For example CD-00001, DVD-00001 0r BD-00001. The media type can increase in the future, now I have only 3 media type to be simple. If I was using only one media type I know that I can use the DMax function but since the MediaID depend of the media type I have not idea how to do that.

See my blog on Sequential Numbering. It deals with just this type of scenario.

If you have any questions after reading, feel free to ask.

Hope this helps,
Microsoft Access MVP 2007
Author: Microsoft Office Access 2007 VBA

Using MS Access

All Answers

Answers by Expert:

Ask Experts




I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.


I've been designing databases for over 25 years working with dBase, FoxPro, Approach and Access.

Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

Brooklyn College BA

©2016 All rights reserved.