sequential numbers

  • Thread starter Thread starter starrider
  • Start date Start date
S

starrider

Guest
I am creating a table to organize a purchasing system. I need for the database to issue sequential purchase order numbers in this format: 272-XXXX. The XXXX portion must begin at 2000. Any help would be appreciated.
 
Look up the DMax function in VBHelp. Essentially, you want to create a custom (text) OrderNumber field and on the creation of each record, set the value to DMax("[OrderNumber]","Nameof Table")
This kind of custom ID does have its limitations though.
eg, max Number of records = 8000 and also will the 272- always remain 272-?
Keep an AutonumberID field for record referencing and table relationships though.
HTH
 
Thanks Fizzio. Yes, the 272 will remain constant.
 
If "272-" is truely a constant, don't store it at all. Simply concatenate it with your serial number for display purposes.
 

Users who are viewing this thread

Back
Top Bottom