Link to home
Start Free TrialLog in
Avatar of McGurk1
McGurk1Flag for United States of America

asked on

vb.net remove commas at end of address if not all fields are entered

I have to concatenate 5 fields into one string to create an address that is entered into one field in a database.  When not all of the fields are entered, I get commas at the end of the string, i.e. "555 North Ave, , , "   How can I removed these before saving?  It is not a matter of saving to different fields...I am working with old code and old tables that already have thousands of addresses that were saved to one field and I cannot change that.  I also cannot require all address fields have data.  I just want the save to the one address field as clean as possible.   Thanks for your help in advance.
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of McGurk1

ASKER

Thanks for the help.  This does only get rid of the last ","  but is heading in the right direction.