Create record based on field in query
Posted on 2013-05-20
Hopefully I can explain what I need....
I have a table that has a serial number (unique number) and "qty per carton" field.
say the serial number is "1PB0J841E " with a qty per carton of 4 -- I would like to see 4 results to my "query"
1PB0J841E 4 times with a field that has 1PB0J841E001, 1PB0J841E002, 1PB0J841E003,1PB0J841E004. (still unique numbers)
The qtys per carton vary from 1 to 200, most are 1
Ideally I would like to end up with a table that has the original serial number and the new serial number(s).
I just don't know VBA or Access Basic to create the new table (From what I read I don't think I can do this in a query)
My query to get the original results (serial number and qty per carton) is:
SELECT dbo_OP_DA_CARTONS.Carton_Serial_No, dbo_OP_DA_CARTONS.Qty_Per_Carton
WHERE (((dbo_OP_DA_CARTONS.Company_Code)="D") AND ((dbo_OP_DA_CARTONS.Order_No)=141788));
Any help would be appreciated.