I have two tables that have a relationship...now the query is basic..I just need to get all the records from both table put into a single line
If you want to have the "PartNumber" and the "Attribute" fields from both tables in a single line, you would add the "PartNumber" and the "Attribute" fields from both tables.
It would look like
Code:
partnumber attribute partnumber attribute
.....xyz........... 10..........xyz........... 15
If you want to have one "PartNumber" and one "Attribute" from BOTH tables, you would need to use a Union query.
It would look like
Code:
partnumber attribute
......abc.......... 13 (From Table1)
......abc......... .16 (From Table2)
......xyz.......... 10 (From Table1)
......xyz......... .15 (From Table2)
Then use a report for grouping.
Or you could use the (sorted) union query as the source and use VBA create a CSV file which could then be imported into Excel in your format.
Loop through the query, writing the first line with the "PartNumber" and "Attribute", then a line with only the "Attribute" until the "PartNumber" changes.