Question : How Can I Create a Unique Sequential Number for Only Those Records in a Table That Meet a Criteria

I have a table of requests. Each request has a unique AutoID. Some of these Requests are then Approved. (The Status Field is Changed from "Requested" to "Approved" via a Combo Box on a Form.)

I would like for that event to trigger the creation of a new unique number that is sequential to the last number. for example if there are ten requests, with Auto Ids 1-10, but Request #5 and #8 have their status changed from "Requested" to "Approved", these two would have two unique IDs. (In a field called CAR_Num) Ideally those numbers would be "CAR" + Year (e.g. 09) + 0001 and 0002. However, I would settle for simple 1 and 2 if necessary.

Answer : How Can I Create a Unique Sequential Number for Only Those Records in a Table That Meet a Criteria

To get it in the format you requested...
"CAR" + Year (e.g. 09) + 0001 and 0002

...You could follow HainKurt's suggestion... (which is basically the same as I gave you in your other thread), and then add another column called CAR_Num_Full

this would be

update MyTable set CAR_Num_Full = "CAR" &  right(datepart("yyyy", Now()),2) &  right(cstr(cstr("0000") & cstr(CAR_Num)),4)
Random Solutions  
 
programming4us programming4us