I have a database which has the whole name in one field, unfortunately the names don't just consist of first, middle and last names, they are more along the lines of The Revd Cannon Andrew Perry.
I am most concerned with the last part of the name as then at least I would be able to search on this bit. I am trying to use an update query to import the last bit of the string in to a new field. I can extract the first word using the left command and usiing mid I can get everything after the first space, but when I try to get the whole last word using the right command it returns only partial bits of it. This is my query:
UPDATE NewSubsTestWithNames SET NewSubsTestWithNames.sbNewSurname = Right$([sbLastName],InStr([sbLastName]," "
);
Can any one point out where I'm going wrong please.
Thanks in Advance
Steph
I am most concerned with the last part of the name as then at least I would be able to search on this bit. I am trying to use an update query to import the last bit of the string in to a new field. I can extract the first word using the left command and usiing mid I can get everything after the first space, but when I try to get the whole last word using the right command it returns only partial bits of it. This is my query:
UPDATE NewSubsTestWithNames SET NewSubsTestWithNames.sbNewSurname = Right$([sbLastName],InStr([sbLastName]," "
Can any one point out where I'm going wrong please.
Thanks in Advance
Steph