Hello world,
I have a database in the works in need of an inventory serial numbering system, and I've having difficulty deciding how to best design three or four elements of it.
First, I have several prefixes that I'll need to begin with (LC, APW, etc). I've called this field Device Type Abbreviation.
Second, I need to incrementally generate values for each subsequent entry of each Device Type so that I can have numbers generated like LC-1, LC-2, AMW-1, AMW-2, etc, and I cannot have any duplicates among all of these generated numbers.
Third, I need be certain that this two-part generated number will be output to a field in my form and table so that I can search later for certain serial numbers and field the customer associated with each item.
So, that's the idea, and this is what I've come up with so far. I have created a table and produced a form from it both titled New Inventory Item. In both the table and form I have three fields in the following order: Device Type Abbreviation, Device Type Number, and Auto-Assigned Number. To recap, the first field is from a list of prefixes, the second field should be generated as the next incremental number for that prefix, and the third is simply the concatenation of the first two fields that I then need to make sure is updated on my original table.
To be clear, I haven't touched programming in about 10 years, but I can make my way around in it fair enough at present. Any help and questions for clarity are welcome. I look forward to any replies.
I have a database in the works in need of an inventory serial numbering system, and I've having difficulty deciding how to best design three or four elements of it.
First, I have several prefixes that I'll need to begin with (LC, APW, etc). I've called this field Device Type Abbreviation.
Second, I need to incrementally generate values for each subsequent entry of each Device Type so that I can have numbers generated like LC-1, LC-2, AMW-1, AMW-2, etc, and I cannot have any duplicates among all of these generated numbers.
Third, I need be certain that this two-part generated number will be output to a field in my form and table so that I can search later for certain serial numbers and field the customer associated with each item.
So, that's the idea, and this is what I've come up with so far. I have created a table and produced a form from it both titled New Inventory Item. In both the table and form I have three fields in the following order: Device Type Abbreviation, Device Type Number, and Auto-Assigned Number. To recap, the first field is from a list of prefixes, the second field should be generated as the next incremental number for that prefix, and the third is simply the concatenation of the first two fields that I then need to make sure is updated on my original table.
To be clear, I haven't touched programming in about 10 years, but I can make my way around in it fair enough at present. Any help and questions for clarity are welcome. I look forward to any replies.