Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Need Help with separating a Semicolon delimited data in a Memo Field

Discussion in 'Information Technology' started by WillyBilly, Jul 28, 2006.

  1. WillyBilly

    WillyBilly
    Expand Collapse
    Guest

    Hi,
    I am very new to this,
    I have a Memo field that contains data between semicolons and I was
    hoping to separate this items and put them on on single columns with a
    record.

    Any tips on a VBA procedure that would help me ?
    I am using the following to extract the first string :

    Public Function SeparateFirstfield(FieldIn) As String
    Dim intX As Integer
    intX = InStr(1, [FieldIn], ";")
    SeparateFirstfield = Left(FieldIn, intX - 1)
    End Function

    (thanks to an earlier posting)

    and the following to get to the second :
    Public Function SeparateTitle1(FieldIn) As String
    Dim intX1 As Integer
    intX1 = InStr(32, [FieldIn], ";")
    SeparateTitle1 = Mid(FieldIn, intX1 + 1, ) *** and I endeup getting
    everything else in the field.

    any help would be appreciated..
    Thanks
     
  2. Loading...

    Similar Threads Forum Date
    Interracial And Interfaith Marriage, Help Needed To Confront/convince My Parents Love & Marriage Aug 16, 2016
    17 yr old Baljit needs your help Get Involved Aug 19, 2015
    Learn Punjabi Need help Language, Arts & Culture May 20, 2014
    United Sikhs From United Sikhs. Phillippines Needs Your Help Sikh Organisations Nov 22, 2013
    Need Help... (Keeping Hair) Questions and Answers Sep 2, 2013

  3. Michael J. Strickland

    Michael J. Strickland
    Expand Collapse
    Guest

    "WillyBilly" <wilson-n.santos@ubs.com> wrote in message
    news:1149171242.264693.60730@y43g2000cwc.googlegroups.com...
    > Hi,
    > I am very new to this,
    > I have a Memo field that contains data between semicolons and I was
    > hoping to separate this items and put them on on single columns with a
    > record.
    >
    > Any tips on a VBA procedure that would help me ?
    > I am using the following to extract the first string :
    >
    > Public Function SeparateFirstfield(FieldIn) As String
    > Dim intX As Integer
    > intX = InStr(1, [FieldIn], ";")
    > SeparateFirstfield = Left(FieldIn, intX - 1)
    > End Function
    >
    > (thanks to an earlier posting)
    >
    > and the following to get to the second :
    > Public Function SeparateTitle1(FieldIn) As String
    > Dim intX1 As Integer
    > intX1 = InStr(32, [FieldIn], ";")
    > SeparateTitle1 = Mid(FieldIn, intX1 + 1, ) *** and I endeup getting
    > everything else in the field.
    >
    > any help would be appreciated..
    > Thanks
    >



    You can use the Split function to parse a string's (or field's)
    components into an array. Then assign each element of this array to
    the desired fields in your table.

    For example, assuming your memo field is FieldIn:

    Dim strArray() As String
    strArray = Split(FieldIn, ";")


    --
    ---------------------------------------------------------------
    Michael J. Strickland
    Quality Services qualityser@att.net
    703-560-7380
    ---------------------------------------------------------------
     
  4. WillyBilly

    WillyBilly
    Expand Collapse
    Guest

    Michael J. Strickland wrote:
    > "WillyBilly" <wilson-n.santos@ubs.com> wrote in message
    > news:1149171242.264693.60730@y43g2000cwc.googlegroups.com...
    > > Hi,
    > > I am very new to this,
    > > I have a Memo field that contains data between semicolons and I was
    > > hoping to separate this items and put them on on single columns with a
    > > record.
    > >
    > > Any tips on a VBA procedure that would help me ?
    > > I am using the following to extract the first string :
    > >
    > > Public Function SeparateFirstfield(FieldIn) As String
    > > Dim intX As Integer
    > > intX = InStr(1, [FieldIn], ";")
    > > SeparateFirstfield = Left(FieldIn, intX - 1)
    > > End Function
    > >
    > > (thanks to an earlier posting)
    > >
    > > and the following to get to the second :
    > > Public Function SeparateTitle1(FieldIn) As String
    > > Dim intX1 As Integer
    > > intX1 = InStr(32, [FieldIn], ";")
    > > SeparateTitle1 = Mid(FieldIn, intX1 + 1, ) *** and I endeup getting
    > > everything else in the field.
    > >
    > > any help would be appreciated..
    > > Thanks
    > >

    >
    >
    > You can use the Split function to parse a string's (or field's)
    > components into an array. Then assign each element of this array to
    > the desired fields in your table.
    >
    > For example, assuming your memo field is FieldIn:
    >
    > Dim strArray() As String
    > strArray = Split(FieldIn, ";")
    >
    >
    > --
    > ---------------------------------------------------------------
    > Michael J. Strickland
    > Quality Services qualityser@att.net
    > 703-560-7380
    > ---------------------------------------------------------------


    Thank you Michael,
    I wil ltry try it . ANy tips on how to extract it each item ? I'd
    appreciate it.
     
  5. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    "WillyBilly" <wilson-n.santos@ubs.com> wrote in message
    news:1149254082.742145.121060@u72g2000cwu.googlegroups.com...
    >
    > Michael J. Strickland wrote:
    >> "WillyBilly" <wilson-n.santos@ubs.com> wrote in message
    >> news:1149171242.264693.60730@y43g2000cwc.googlegroups.com...
    >> > Hi,
    >> > I am very new to this,
    >> > I have a Memo field that contains data between semicolons and I was
    >> > hoping to separate this items and put them on on single columns with a
    >> > record.

    >>
    >>
    >> You can use the Split function to parse a string's (or field's)
    >> components into an array. Then assign each element of this array to
    >> the desired fields in your table.
    >>
    >> For example, assuming your memo field is FieldIn:
    >>
    >> Dim strArray() As String
    >> strArray = Split(FieldIn, ";")

    >
    > Thank you Michael,
    > I wil ltry try it . ANy tips on how to extract it each item ? I'd
    > appreciate it.


    Read the help file for how the Split function works.

    If your text contains

    String of text 1; String of text 2; String of text 3

    then after using the Split function, strArray(0) will contain "String of
    text 1", strArray(1) will contain "String of text 2" and strArray(2) will
    contain "String of text 3"


    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)
     
  6. lkk

    lkk
    Expand Collapse
    Guest

    "WillyBilly" <wilson-n.santos@ubs.com>
    ???????:1149254082.742145.121060@u72g2000cwu.googlegroups.com...
    >
    > Michael J. Strickland wrote:
    >> "WillyBilly" <wilson-n.santos@ubs.com> wrote in message
    >> news:1149171242.264693.60730@y43g2000cwc.googlegroups.com...
    >> > Hi,
    >> > I am very new to this,
    >> > I have a Memo field that contains data between semicolons and I was
    >> > hoping to separate this items and put them on on single columns with a
    >> > record.
    >> >
    >> > Any tips on a VBA procedure that would help me ?
    >> > I am using the following to extract the first string :
    >> >
    >> > Public Function SeparateFirstfield(FieldIn) As String
    >> > Dim intX As Integer
    >> > intX = InStr(1, [FieldIn], ";")
    >> > SeparateFirstfield = Left(FieldIn, intX - 1)
    >> > End Function
    >> >
    >> > (thanks to an earlier posting)
    >> >
    >> > and the following to get to the second :
    >> > Public Function SeparateTitle1(FieldIn) As String
    >> > Dim intX1 As Integer
    >> > intX1 = InStr(32, [FieldIn], ";")
    >> > SeparateTitle1 = Mid(FieldIn, intX1 + 1, ) *** and I endeup getting
    >> > everything else in the field.
    >> >
    >> > any help would be appreciated..
    >> > Thanks
    >> >

    >>
    >>
    >> You can use the Split function to parse a string's (or field's)
    >> components into an array. Then assign each element of this array to
    >> the desired fields in your table.
    >>
    >> For example, assuming your memo field is FieldIn:
    >>
    >> Dim strArray() As String
    >> strArray = Split(FieldIn, ";")
    >>
    >>
    >> --
    >> ---------------------------------------------------------------
    >> Michael J. Strickland
    >> Quality Services qualityser@att.net
    >> 703-560-7380
    >> ---------------------------------------------------------------

    >
    > Thank you Michael,
    > I wil ltry try it . ANy tips on how to extract it each item ? I'd
    > appreciate it.
    >
     

Share This Page