[AccessD] how to split text into its letters...
Stuart McLachlan
stuart at lexacorp.com.pg
Mon Jul 27 16:44:40 CDT 2015
Yet another method in a similar vein :-)
strOut=Left$(strIn,1)
For i = 2 to Len(strIn)
strOUt = strOut & "," & Mid$(strIn,i,1)
Next
--
Stuart
On 27 Jul 2015 at 16:30, Bob Walsh wrote:
> You don't have to take it out if you don't put it there in the first
> place...
> Case Else
> If I = 1 then
> strOut = strOut & Mid(strIn, i, 1)
> else
> strOut = strOut & "," & Mid(strIn, i, 1)
> ...
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf
> Of Rocky Smolin Sent: Sunday, July 26, 2015 10:20 AM To: 'Access
> Developers discussion and problem solving' Subject: Re: [AccessD] how
> to split text into its letters...
>
> After the loop: strOut=left(strOut,Len(strOut)-1) I think will do it.
>
> Rocky
>
>
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf
> Of Kostas Konstantinidis Sent: Sunday, July 26, 2015 9:01 AM To:
> Access Developers discussion and problem solving Subject: Re:
> [AccessD] how to split text into its letters...
>
> 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
> >
> > --
> > 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
>
> --
> 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
> IMPORTANT NOTE: The information contained in this message may be
> privileged, confidential, and protected from disclosure. If the reader
> of this message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient, you
> are hereby notified that any dissemination, distribution, or copying
> of this communication is strictly prohibited. If you have received
> this communication in error, please notify us immediately and delete
> this message from your computer. Acumentra Health.
>
> --
> 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