I'm making address labels and within the table that I'm using there are 2 address fields called Address1 and Address2. The majority of the records do not use Address2, but some do. Is there an expression in VB that I can write so that if Address2 is blank, it will not show Address2
Here's my snippet so far. It's inside a text box inside a list box in the layout of reporting in visual studio 2005.
=RTrim(Fields!FirstName.Value) & " " & Fields!LastName.Value & vbCrLF &
Fields!Address1.Value & vbCrLF & Fields!Address2.Value & vbCrLF &
RTrim(Fields!City.Value) & ", " & Fields!State.Value & " " & Fields!ZipCode.Value
This code produces the following if there is no Address2:
John Doe
234 W. Nowhere St.
Seattle, WA 77658
How can I make it so that it will know that Address2 is blank and to return this:
John Doe
234 W. Nowhere St.
Seattle, WA 77658
Any help is greatly appreciated!