Extending the Proper function

  • Thread starter Thread starter Prism695
  • Start date Start date
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!
 
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

Back
Top Bottom