Jumat, 30 Mei 2014

Re: [MS_AccessPros] Re: Separating names like Mary/John OOOPS

 

you can build a single function and use it in an update query. Untested

Public Function getName(varName as variant, WhichName as integer) as variant
   dim strNames() as string 
   on error resume Next
   if not isnull(varName)
      if WhichName = 1 or WhichName = 2 then
          WhichName = WhichName - 1
          getName = split(cstr(varName),"/")(WhichName)
      end if
   end if
end function


On Fri, May 30, 2014 at 5:37 PM, Robin Chapple robinski@westnet.com.au [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
 


The original field is "Mary/John Smith".

I have extracted the last name already.

Sorry!

Robin

At 31/05/2014 07:33 AM, you wrote:

 

Thanks Bill,

I need Mary/John to be in separate fields please.

Regards,

Robin

At 31/05/2014 06:52 AM, you wrote:
 

Robin
Two fields or two records?

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
http://mvp.microsoft.com/en-us/mvp/Bill%20Mosca-35852
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

 


__._,_.___

Posted by: Peter Poppe <plpoppe@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)

.

__,_._,___

Tidak ada komentar:

Posting Komentar