[AccessD] Strip out text

Jim DeMarco Jdemarco at hudsonhealthplan.org
Tue Apr 4 12:29:59 CDT 2006


No A97 doesn't support Split, sorry.  You can find a Split replacement
on Codehound.com though and run with that.  Another option is to use
Instr() and Mid() functions to walk through the text.  InStr to find the
location of the trailing underscore and Mid to grab whatever piece of
text you need (from the beginning of the string or the previous Instr
location stored in a variable).  

Let me know if you need an example (Split's a lot easier though).  I can
probably whip up some pseudo-code if need be.


Jim D.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
Sent: Tuesday, April 04, 2006 1:18 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Strip out text

Jim,

Thanks for the example...I am using A97...and it does not recognize
"Split"  
Am I missing a reference...or need a later version of Access?

Thanks,

Mark A. Matte


>From: "Jim DeMarco" <Jdemarco at hudsonhealthplan.org>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: "Access Developers discussion and problem solving" 
><accessd at databaseadvisors.com>
>Subject: Re: [AccessD] Strip out text
>Date: Tue, 4 Apr 2006 12:57:35 -0400
>
>Felt guilty.  Here's a sample using Split. You can work out getting 
>each element into your table via recordset.
>
>Sub SplitString()
>Dim str As String
>Dim arrStr
>Dim i As Integer
>
>     str = "AB_55_tt_1g"
>     arrStr = Split(str, "_")
>      For i = 0 To UBound(arrStr)
>         Debug.Print arrStr(i)
>      Next i
>End Sub
>
>Jim
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim DeMarco
>Sent: Tuesday, April 04, 2006 12:37 PM
>To: Access Developers discussion and problem solving
>Subject: Re: [AccessD] Strip out text
>
>Why not use the Split function (splitting on the underscore) which will

>break your string up into an array, then loop through the array to add 
>new records to your table (sorry for no example).
>
>HTH,
>
>Jim DeMarco
>
>-----Original Message-----
>From: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
>Sent: Tuesday, April 04, 2006 12:10 PM
>To: accessd at databaseadvisors.com
>Subject: [AccessD] Strip out text
>
>Hello All,
>
>I have just recieved a new db to link to...and I want to create a 
>dictionary for all of the wonderful acronym names used.  I have a list 
>of field names in each table.  The format is the same across the board:
>BB_CREG_TU  or TTT_PROG_GYU_FRWTG (format= some letters...an 
>undersore...more letters...and so on)
>
>The can be 1 - 4 underscores in each name.  I would like to take this 
>list of field names and strip out each part and create a new list.  For

>the example above I would now have 7 records...starting with BB and 
>ending with FRWTG.  The underscore is always the seperator.  Any 
>suggestions/direction would be greatly appreciated.
>
>Thanks,
>
>Mark A. Matte
>
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>
>
>
>
>
>***********************************************************************
>*
>***********
>"This electronic message is intended to be for the use only of the 
>named recipient, and may contain information from Hudson Health Plan 
>(HHP) that is confidential or privileged.  If you are not the intended 
>recipient, you are hereby notified that any disclosure, copying, 
>distribution or use of the contents of this message is strictly 
>prohibited.  If you have received this message in error or are not the 
>named recipient, please notify us immediately, either by contacting the

>sender at the electronic mail address noted above or calling HHP at
>(914) 631-1611. If you are not the intended recipient, please do not 
>forward this email to anyone, and delete and destroy all copies of this

>message.  Thank You".
>***********************************************************************
>*
>***********
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>
>
>
>
>
>***********************************************************************
>************ "This electronic message is intended to be for the use 
>only of the named recipient, and may contain information from Hudson 
>Health Plan (HHP) that is confidential or privileged.  If you are not 
>the intended recipient, you are hereby notified that any disclosure, 
>copying, distribution or use of the contents of this message is 
>strictly prohibited.  If you have received this message in error or are

>not the named recipient, please notify us immediately, either by 
>contacting the sender at the electronic mail address noted above or 
>calling HHP at (914) 631-1611. If you are not the intended recipient, 
>please do not forward this email to anyone, and delete and destroy all 
>copies of this message.  Thank You".
>***********************************************************************
>************
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


 



***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message.  Thank You".
***********************************************************************************




More information about the AccessD mailing list