Control calculations

  • Thread starter Thread starter Mark Stones
  • Start date Start date
M

Mark Stones

Guest
*****Scenerio*******
I have a serial number database which contain serial numbers in the format of: AA0000, AB0000 and so on. All are prefixed with two characters followed by four numbers. All serial numbers are unique.

Each format is linked to a different part number so that when i add new serials, they are added under the correct part number.

****Problem******
When adding a new record is it possible to have the serial number control automatically filled with the next unused serial number? eg. last serial entered = AA0024, upon new record AA0025 is auto entered.

Hope this makes sense

Thanks

MaRK
 
Hi Mark
One of the possible solutions would be to store your last (highest) number in a table.
When inserting a new record get the value from your "Id" table and increment it by one.
Make your new serial and write the new Id back to the "Id" table.
Good Luck
Kaspi
 

Users who are viewing this thread

Back
Top Bottom