Discussion Locked

Access - Combining Fields to one record

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a table that lists let's say
Type Color
car blue
car red
car yellow
truck red
truck blue and so on
Need to make new table and combine all the cars in one record and list the color as blue, red, yellow in that one record. Make sense? Car red, yellow, blue

3 replies

by roc180

If you want the data to be displayed that way for reporting reasons, use a crosstab query. Access has a nice wizard that will walk you through the steps. If you need a concrete example let me know I can Email you one. If you want to store the datathat way permently (ie new table) I would not recommend it, for the following reason: Today car colors are red, green and blue, so you make a table with columns Vehicle, Col1, Col2, Col3. That table will work today but what happens when a new coloris introduced (White) now a new column has to be added to your table.

Good Luck

Neal Martinelli

by vhansen86

Had to use a public function to get the table to look the way I needed it to. Thanks for the try though.

This discussion is closed to new replies.