Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trailing ",'" when joining text field without value 4

Status
Not open for further replies.

patyavila

Technical User
Apr 29, 2004
28
US
The report displays a calculated [field1]& ", " & [field2], when field2 is empty I have a trailing semicolon as result.
I will appreciate help... :)
 
Try:
[tt][field1] & IIf([field2] Is Null,", ","") & [field2][/tt]
 
Try this:

Code:
[field1] & IIF(NOT IsNull([field2]), ", " & [field2], "")

This code checks a null value and if so only returns an empty string to be appended. If data is found then the comma(, ) and the field value is appended.

Good luck.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
try [field1] &[/color ] ", " +[/color ] [field2]
The difference concatenating with an ampersand and a plus sign is that when you concatenate with a plus sign it only adds the value if all values are not null
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top