[AccessD] Treat string as array

Michael R Mattys mmattys at rochester.rr.com
Mon Mar 24 12:18:22 CDT 2008


I'm going to be looking at this TextTool.mdb for some ideas
on cleaning up imported textfiles. Looks like the GetBytes routine
might offer a method for you - dunno.

http://www.freevbcode.com/ShowCode.Asp?ID=3280

Michael R. Mattys
MapPoint & Access Dev
www.mattysconsulting.com

----- Original Message ----- 
From: "jwcolby" <jwcolby at colbyconsulting.com>
To: "'Access Developers discussion and problem solving'" 
<accessd at databaseadvisors.com>
Sent: Monday, March 24, 2008 12:49 PM
Subject: Re: [AccessD] Treat string as array


> Michael,
>
> Split() only works on delimited strings.  It is designed to break a string
> of words (for example) into an array of the words.  In that case it would
> use the spaces as the delimiter.
>
> I am trying to take any string and put the INDIVIDUAL CHARACTERS OF THE
> STRING into INDIVIDUAL ELEMENTS of an array. If I gave you a string of
> "12345asdfg" and you pass that to split you would get (I assume)
> "12345asdfg" back in one element of an array.  I need 1 in the first
> element, 2 in the next element, 3 in the next element etc.
>
> Go back to the very beginning of this thread and look at what I asked for.
>
>>> How can I turn a string into an array?  I need to iterate through the
>>> characters of a string.
>>>
>>> For each char in str
>>> dosomething char
>>> Next char
>
> Arrays have iterators (for each next).  Strings do not.
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Michael Bahr
> Sent: Monday, March 24, 2008 12:37 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Treat string as array
>
> Ok, but the principles still apply.  Try this
> http://www.vbforums.com/showthread.php?t=470268
>
> and for reference
> http://www.codeguru.com/forum/archive/index.php/t-250108.html
> http://www.thescripts.com/forum/thread13305.html
>
> Mike...
>
>
>> Thanks.  VBA.
>>
>>
>> John W. Colby
>> Colby Consulting
>> www.ColbyConsulting.com
>> -----Original Message-----
>> From: accessd-bounces at databaseadvisors.com
>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Michael
>> Bahr
>> Sent: Sunday, March 23, 2008 8:21 PM
>> To: Access Developers discussion and problem solving
>> Subject: Re: [AccessD] Treat string as array
>>
>> JOhn, take a look here
>> http://www.thescarms.com/dotnet/dotnetstring.aspx
>>
>> Mike...
>>
>>
>>> How can I turn a string into an array?  I need to iterate through the
>>> characters of a string.
>>>
>>> For each char in str
>>> dosomething char
>>> Next char
>>>
>>> John W. Colby
>>> Colby Consulting
>>> www.ColbyConsulting.com
>
>
> --
> 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 




More information about the AccessD mailing list