Hello and thanks in advance.
I am creating a DB that contains a number of individual animals and want a unique ID for each row (each individual) to follow a specific format. It should begin with the two letter abbreviation of the species (either MT or BH), a sequential number that is different for each species (i.e. each species starts at 001 and counts sequentially by 1), and the sex of the animal(i.e. M or F).
For example, the first BH would read BH001M. The second female would read BH002F.
When entering a new record I envision a pop up window that requests the species and then the sex of the new individual and then Access would generate the sequential number.
I realize this is a specific question without any data attached, but would appreciate any suggestions on first steps to take.... I.e. is this possible thorough a macro, or do I need to work in VB?
EDIT: In addition to the unique ID, I will also have separate fields for Species and Sex, but also want the unique ID to include the info as well. Having Species and Sex incorporated into the ID will help to identify important quickly.
Per the comment below @OverMind, including a single number is a good idea.
The header of my Access table looks like:
From the table, I created a form (below)
I wanted to hit the "Add new Animal" button and then have the popup windows as mentioned above. The data to be entered (only a few records currently) are in an excel spreadsheet, but there will be many more (a few 100) individuals that will need to be entered in the future.
I am in Access 2013
Thanks.