Creating Product ID

  • Thread starter Thread starter Victoria
  • Start date Start date
V

Victoria

I have a table with 34,212 records and a primary key in a
field called ID. My boss wants each record to
automatically assign itself a company order number in a
format of 04-xxxxx. I was able to somewhat do this in the
ID field but 04 for the year is assigned to all records
such as 04-00001 to 04-34212. I have a date field for each
record and hoped someone could show me the right way to
assign unique order numbers by year automatically assigned?

Thanks to anyone that can try and help,
Victoria
 
Something like this"
OrderNumber = format(DateField, "yy") &"-" & ID

Where you put this exactly depends on what you are doing.
 
I just can't seem to find where and how to place this. It
makes sense but I keep getting errors or itplaces this
line on the field. Please help

Thanks,
Victoria
 
It sounded as if the problem involved GENERATING the number, not formatting it.
I would presume that the boss wanted the ID numbers to be reinitialized with
'1' each year. It would be the combination of the year AND the ID number which
would be a true identifier.

Rick
 
Back
Top