[AccessD] how to split text into its letters...

David Emerson newsgrps at dalyn.co.nz
Sun Jul 26 16:01:00 CDT 2015


Stuart,

Your suggestion would not deal with situations where Characters that you
want to ignore are on the end.  I think Rocky's solution would be better
which deletes the last comma.

Regards

David Emerson
Dalyn Software Ltd
Wellington, New Zealand



-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Stuart McLachlan
Sent: Monday, 27 July 2015 8:37 a.m.
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] how to split text into its letters...

For i = 1 to Len(strln) - 1
.....
Next i
strOut = StrOut + Right$(strIn,1)
...


On 26 Jul 2015 at 19:01, Kostas Konstantinidis wrote:

> Hi David,
> it works just as I need
> it would be better If it was possible to cut the last comma 
> 1,2,3,4,-,.......,-,
> 
> many many thank's
> /kostas
> 
> 
> ----- -----
> From: David McAfee
> Sent: Sunday, July 26, 2015 12:23 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] how to split text into its letters...
> 
> something like this should work
> 
> Public Function SeparateChars(strIn As String) As String
>    Dim strOut As String, i As Integer
>    For i = 1 To Len(strIn)
>       Select Case Mid(strIn, i, 1)
>         Case " ", "|"  'Characters that you want to ignore go here
>         Case Else
>             strOut = strOut + Mid(strIn, i, 1) & ","
>        End Select
>       'i = i + 1
>      Next i
>     SeparateChars = strOut
> End Function
> 
> 
> 
> End Function
> 
> On Sat, Jul 25, 2015 at 10:08 AM, Kostas Konstantinidis 
> <kost36 at otenet.gr> wrote:
> 
> > hi,
> > In a field there text values, something like 1234-5679(1678)68:3;1- 
> > What I need is to split text with every character separate by a 
> > comma e.g. 1,2,3,4,-,.......,-
> >
> > Is that possible via query?
> >
> > thank's
> > /kostas



More information about the AccessD mailing list