welby Posted February 28, 2006 Posted February 28, 2006 Hi, I have two fields namely address1 and address2. I need to merge these 2 fields seperated by commas. This is how I achived this: address1 & "," & address2 & "," This is fine if both fields are populated, but if the second field is empty I get double ,, at the end of address1. Such as: address1,, I have tried to use the Substitute command without little success. Could anyone please point me in the right direction. Thank you
RogerJ Posted February 28, 2006 Posted February 28, 2006 Why do you need the 2nd set of ",". If you leave it off, it should only show the one "," Roger in Midland, Tx Hi, I have two fields namely address1 and address2. I need to merge these 2 fields seperated by commas. This is how I achived this: This is fine if both fields are populated, but if the second field is empty I get double ,, at the end of address1. Such as: I have tried to use the Substitute command without little success. Could anyone please point me in the right direction. Thank you
welby Posted February 28, 2006 Author Posted February 28, 2006 hi, the reason is that the resultant file goes into a database that then displays the address as: , Just the way it should be. Hope this helps?
musicarteca Posted February 28, 2006 Posted February 28, 2006 Create a calculation field of result text called Addresses_Merged: If ( IsEmpty ( Address2 ) ; Address1 ; Address1 & "," & Address2 ) & ","
welby Posted March 19, 2006 Author Posted March 19, 2006 Hi thank you for the reply...worked a treat! Apologies for the delay in reading this. Been away from the pc for a while. Thanks again.
Recommended Posts
This topic is 6857 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now