Hello all,
I have a table that contains a list of materials, with 7 separate fields for descriptions segments. These are called ADesc, BDesc, CDesc, DDesc, EDesc, FDesc, GDesc.
I would like to display the combined description into a single field output of a query, so at the moment i have the following:
Description: [ADesc] & ", " & [BDesc] & ", " & [CDesc] & ", " & [DDesc] & ", " & [EDesc] & ", " & [FDesc] & ", " & [GDesc]
This works OK but i have the following problem:
Some of the materials do not have descriptions in all fields, so for example there might be content in ADesc, BDesc, CDesc, but nothing in DDesc, EDesc, FDesc, GDesc. So the result is:
ADesc, BDesc, CDesc, , , ,
(note the extra commas)
The quantity of description fields used will vary entry by entry, but will always be from left to right (A to G)
I can imagine a way of doing it using a long series of nested iif statements, but would anyone have an idea of how to get rid of the extra commas hopefully in a more 'elegant' way?
The query gets displayed in a form, maybe i can more easily get rid of the commas through some formatting in the form?
Any advice would be much appreciated.
I have a table that contains a list of materials, with 7 separate fields for descriptions segments. These are called ADesc, BDesc, CDesc, DDesc, EDesc, FDesc, GDesc.
I would like to display the combined description into a single field output of a query, so at the moment i have the following:
Description: [ADesc] & ", " & [BDesc] & ", " & [CDesc] & ", " & [DDesc] & ", " & [EDesc] & ", " & [FDesc] & ", " & [GDesc]
This works OK but i have the following problem:
Some of the materials do not have descriptions in all fields, so for example there might be content in ADesc, BDesc, CDesc, but nothing in DDesc, EDesc, FDesc, GDesc. So the result is:
ADesc, BDesc, CDesc, , , ,
(note the extra commas)
The quantity of description fields used will vary entry by entry, but will always be from left to right (A to G)
I can imagine a way of doing it using a long series of nested iif statements, but would anyone have an idea of how to get rid of the extra commas hopefully in a more 'elegant' way?
The query gets displayed in a form, maybe i can more easily get rid of the commas through some formatting in the form?
Any advice would be much appreciated.