I have a pretty complex database that tracks product creation through sales. My product is separated into Batches. Each Batch has roughly 400 Units of varying size for sale. I need to be able to auto assign sequential numbers for each Unit ordered from each Batch. Orders will often have multiple Units purchased. Each Batch needs to have it's own set of sequential numbers though.
Example:
Product Batch A
Product Batch B
Order 1:
3 Units of Batch A
Auto assign numbers 001, 002, 003.
Order 2:
5 Units of Batch B
Auto assign numbers 001, 002, 003, 004, 005.
Order 3:
4 Units of Batch A
Auto assign numbers 004, 005, 006, 007.
Etc,.
The orders are placed using an Order Form that is based on the Order Table. The Order Table relates to the Processing Table by Batch ID. I'm not sure how I can include these sequential numbers in the orders. I don't know if I need to make another table and join it with the Order Table somehow? I'm really at a loss as to how I can accomplish this. Any ideas would be greatly appreciated!!