Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Elaborate serial numbering project... 1

Status
Not open for further replies.

cbk10

Technical User
Dec 30, 2010
12
US
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.
 
exact same problem. I had

strWhere = "Device_Type_Abbreviation = '" & abb & "'"

But you do not have the underscores, so it is
strWhere = "[Device Type Abbreviation] = '" & abb & "'"
 
Well sir, everything works like a charm. I appreciate your help very, very much. This is exactly what I needed, and I would never have come up with this on my own lol. Happy New Year, and thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top