ncalcaterra
Programmer
hi there... i'd greatly appreciate any help on this little annoyance of mine.
i have the following fields:
Address1
Address2
City
State
Zip
they may or may not have values in them, depending on the situation. however, i still would like to concatenate them into a "nice" flowing string with proper puncuation. i sense i'm close, but my brain is just shutting down at them moment. heres what i have so far:
Address: IIf(IsNull([Address1]),"",[Address1] & ", ") & IIf(IsNull([Address2]),"",[Address2] & ", ") & IIf(IsNull([City]),"",[City] & ", ") & IIf(IsNull([State]),"",[State] & " ") & IIf(IsNull([Zip]),"",[Zip])
what i'm ultimately looking for is this:
address1, address2, city, state zip (and if one of them is null, it will not show the comma that would normally follow the value). with the statement i have above, a comma is displayed after Address2 (even when the field is null).
hope this makes sense and i really appreciate any time someone could offer me on this. thanks!
i have the following fields:
Address1
Address2
City
State
Zip
they may or may not have values in them, depending on the situation. however, i still would like to concatenate them into a "nice" flowing string with proper puncuation. i sense i'm close, but my brain is just shutting down at them moment. heres what i have so far:
Address: IIf(IsNull([Address1]),"",[Address1] & ", ") & IIf(IsNull([Address2]),"",[Address2] & ", ") & IIf(IsNull([City]),"",[City] & ", ") & IIf(IsNull([State]),"",[State] & " ") & IIf(IsNull([Zip]),"",[Zip])
what i'm ultimately looking for is this:
address1, address2, city, state zip (and if one of them is null, it will not show the comma that would normally follow the value). with the statement i have above, a comma is displayed after Address2 (even when the field is null).
hope this makes sense and i really appreciate any time someone could offer me on this. thanks!