Creating Product ID

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
 
R

Roger Carlson

Something like this"
OrderNumber = format(DateField, "yy") &"-" & ID

Where you put this exactly depends on what you are doing.
 
V

Victoria

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
 
R

RSGinCA

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top