I'm using a report field with an expression as the "Control Source" so that I can write out the values of several boolean table fields as comma separated text values in one report field. The code looks like this:
If a record has the boolean table field "Media_Files" set to True, the report will the list something like "Music, PS,".
Now, this works great, apart from the fact that I always get the trailing comma at the end of the field. I was thinking along the lines of using "Len" plus "Left" or "Right" to remove the last character in the field, but can't seem to figure out how to do this in an expression.
Any ideas?
Code:
=IIf([Media_Files]="-1";IIf([MF_Music_Files_Bol]="-1";"Music, ";"") & IIf([MF_Movie_Files_Bol]="-1";"Movies, ";"") & IIf([MF_PlayStation_Files_Bol]="-1";"PS, ";"");"")
If a record has the boolean table field "Media_Files" set to True, the report will the list something like "Music, PS,".
Now, this works great, apart from the fact that I always get the trailing comma at the end of the field. I was thinking along the lines of using "Len" plus "Left" or "Right" to remove the last character in the field, but can't seem to figure out how to do this in an expression.
Any ideas?