Extending the Proper function (1 Viewer)

P

Prism695

Guest
I have been looking for code to allow me to modify a [LastName] field. I need to:
* check that it is the same as the last name portion of a [FullName] field (if not, parse out the last name and suffix fields of the [FullName] field)
* capitalize the second part of a hyphenated name
* capitalize a suffix appropriately, if it exists (using either constants or a lookup table)

Thanks in advance!
 

KDg

Registered User.
Local time
Today, 23:20
Joined
Oct 28, 1999
Messages
181
the first bit is okay - read the records then so an Instr(field) for the space that seperates the first and surnames, you may need to run it backwards or create your own function to start at the end and work to the front. then you can do a StrComp(Surname, section of other name) to see if they're the same and update from there.

The second part you should be able to do much the same way doing an Instr for the hypen. The last bit I have no idea. Also I've been trying to think of a way to capitalize or not people called Mc and de and d' etc, you may be right and a lookup table is the only way, I just don't like having to maintain the system that does the maintenance. Maybe I'm just lazy.
 

Users who are viewing this thread

Top Bottom