I have a table created from an Excel spreadsheet and the DoCmd.TransferSpreadsheet method.
The spreadsheet contains order information from a sales order which can have several items
with the same line number and I am attempting to use a query to take the contents of this table
and combine the options into one field. Not sure if this is even possible but here is what I
have in mind...
The table containing the order information and the options might appear like this:
Order_tbl:
[pre]LineNo PartNo PartDesc Qty
1 12341 Dell OptiPlex PC 1
1 12211 Network Card 1
1 13121 Video Card 1
1 31131 Decryption 1
2 12341 Dell OptiPlex PC 1
2 12211 Network Card 1
2 31131 Decryption 1
3 12341 Dell OptiPlex PC 1
3 31131 Decryption 1
[/pre]
Where I would like to convert this into the following format to show the PC as the PartNo & PartDesc
and then the option part numbers in the Options field:
[pre]LineNo PartNo PartDesc Options:
1 12341 Dell OptiPlex PC 12211 - 13121 - 31131
2 12341 Dell OptiPlex PC 12211 - 31131
3 12341 Dell OptiPlex PC 31131[/pre]
Is there a way to concatenate these fields with a Query or is it easier to do this with code?
Thanks
The spreadsheet contains order information from a sales order which can have several items
with the same line number and I am attempting to use a query to take the contents of this table
and combine the options into one field. Not sure if this is even possible but here is what I
have in mind...
The table containing the order information and the options might appear like this:
Order_tbl:
[pre]LineNo PartNo PartDesc Qty
1 12341 Dell OptiPlex PC 1
1 12211 Network Card 1
1 13121 Video Card 1
1 31131 Decryption 1
2 12341 Dell OptiPlex PC 1
2 12211 Network Card 1
2 31131 Decryption 1
3 12341 Dell OptiPlex PC 1
3 31131 Decryption 1
[/pre]
Where I would like to convert this into the following format to show the PC as the PartNo & PartDesc
and then the option part numbers in the Options field:
[pre]LineNo PartNo PartDesc Options:
1 12341 Dell OptiPlex PC 12211 - 13121 - 31131
2 12341 Dell OptiPlex PC 12211 - 31131
3 12341 Dell OptiPlex PC 31131[/pre]
Is there a way to concatenate these fields with a Query or is it easier to do this with code?
Thanks