B
bw
In the Record Source of my report I have many fields that I want to
concatenate into a single field, when the value of the field is greater than
zero. Using IIF seems too complicated (for me) as I show below. Is there
an easier way to do this?
For example (with two fields):
Meals Hotel (These are both currency fields)
I'd like my new field to contain something like the following:
Expr: IIf([Meals]>0,"Meals=" & Format([Meals],"Currency"),"")
and then concatenate the next field
IIf([Hotel]>0,", Hotel=" & Format([Hotel],"Currency"),"")
and so on, and so on (for any number of fields I choose to include.
and instead of using the literal Meals and Hotel, I'd rather use the field
names in whatever formula is to be used.
The result should of course look like this, when the fields have nonzero
values
Meals=$12.76, Hotel=$127.65
Thanks for your help.
Bernie
concatenate into a single field, when the value of the field is greater than
zero. Using IIF seems too complicated (for me) as I show below. Is there
an easier way to do this?
For example (with two fields):
Meals Hotel (These are both currency fields)
I'd like my new field to contain something like the following:
Expr: IIf([Meals]>0,"Meals=" & Format([Meals],"Currency"),"")
and then concatenate the next field
IIf([Hotel]>0,", Hotel=" & Format([Hotel],"Currency"),"")
and so on, and so on (for any number of fields I choose to include.
and instead of using the literal Meals and Hotel, I'd rather use the field
names in whatever formula is to be used.
The result should of course look like this, when the fields have nonzero
values
Meals=$12.76, Hotel=$127.65
Thanks for your help.
Bernie