I am trying to use a query to create a Bill of Materials list that gives an item number to a material. I have a column for Material and BOMPart. The Material column gives a list of item numbers that repeat for each item in the Bill of Materials. The BOMPart column lists each part of the item in Material. So Material 1 is created using items a, b, and c. I would like the third column, ItemNo, to start at 1 for each Material and count each BOMPart associated to the material. It should then reset to 1 for the next Material. Any suggestions? I am still pretty new to Access. Here is what I would like the columns to look like, I replaced my actual material numbers for simplicity.
Material | BOMPart | ItemNo |
---|---|---|
1 | a | 1 |
1 | b | 2 |
1 | c | 3 |
2 | a | 1 |
2 | f | 2 |
3 | g | 1 |
3 | h | 2 |
3 | i | 3 |
4 | k | 1 |
4 | m | 2 |