Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    May 2001
    Location
    Kenilworth, Warwickshire, England
    Posts
    269
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Creating child table entries from a string search (2k)

    I have a large text / memo field with a regular pattern of data in it - a set of code in blocks of 4 or 10.

    I just need to know whether it is possible to examine that field, parse it into its set of individual codes, and write each of these to a separate line in a child table. Woild this be Access functions, or would VBA be involved?

    High level answer would help me map out the direction I want to go

    Thanks

    Mike C

  2. #2
    Star Lounger
    Join Date
    Jan 2003
    Location
    Grass Valley, California, USA
    Posts
    88
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating child table entries from a string sea

    Mike,

    Perhaps someone else can figure out how to do it with "Access Function", but not I. On the other hand, it is a fairly straight forward process using VBA. The "InStr()" function would be a quick method of locating the codes, and their positions within the overall text/memo field.

    -- Jim

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Creating child table entries from a string search (2k)

    Access 2000 provides the Split() function which can be used to quickly parse a string into a single dimensional array. If you don't pass Split a delimiter, it assumes the delimiter is a space. You can then work with the result as you would any other array. If the "codes" are individual characters with a space between blocks of characters, then split would be far faster than using Instr over and over. However, to get at each individual block of characters in the array, you have to use VBA, so there isn't any simple non-VBA solution for this.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •