December 17, 200520 yr I have a calculation field: lastname_comma_firstname my problem is that names that have apostrophes are showing like this: John O'shea when it should be John O'Shea can anyone help me to write a calculation that will prevent this from happening ? the letter following the apostrophe will never be a lower case letter.. as far as I can foretell
December 17, 200520 yr Make a calculated text field cLastName = If ( PatternCount ( LastName ; "'" ) ; Replace ( LastName ; Position ( LastName ; "'" ; 1 ; 1 ) + 1 ; 1 ; Proper ( Middle ( LastName ; Position ( LastName ; "'" ; 1 ; 1 ) + 1 ; 1 ))) ; LastName ) If you have your database set to use smart qoutes you must use a single smart quote in the 3 places where a single quote is used.
December 17, 200520 yr There may be a new way to do this in v7/8, but you will have a hard time beating the way Lynne Bradford handles the names in the older file I POSTED here click here
Create an account or sign in to comment