capri
01-30-2009, 02:37 PM
Hi All,
I am having difficulty with a query :(
Basically I want to Merge three fields into one field in a query from my table as they are three lines of an address.
I used the following code in query design:
[Address Line 1]&" "&[Address Line 2]&" "&[Address Line 3]
Which worked perfectly, however I need these seperated with a comma so I adjusted as follows:
[Address Line 1]&", "&[Address Line 2]&", "&[Address Line 3]
Which again worked HOWEVER my problem is that half of the entries do not have an Address Line 2 so there output in the query is; address line 1, , address line 3.
How do I get rid of the second comma if the second field (address line 2) is blank???
Thanking you in advance :)
I am having difficulty with a query :(
Basically I want to Merge three fields into one field in a query from my table as they are three lines of an address.
I used the following code in query design:
[Address Line 1]&" "&[Address Line 2]&" "&[Address Line 3]
Which worked perfectly, however I need these seperated with a comma so I adjusted as follows:
[Address Line 1]&", "&[Address Line 2]&", "&[Address Line 3]
Which again worked HOWEVER my problem is that half of the entries do not have an Address Line 2 so there output in the query is; address line 1, , address line 3.
How do I get rid of the second comma if the second field (address line 2) is blank???
Thanking you in advance :)