Results 1 to 2 of 2

Thread: Help Splitting Simple String

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    15

    Help Splitting Simple String

    I am looking for any suggestions to split a simple string, with the values separated by commas. For example:

    strFlds = "poc_id,poc_name,address_id"

    I was originally using this to perform the split;
    varFlds = Split(strFlds, ",")

    But this will only return poc_id,poc_name.

    Is there an easy way to include the last value in this split?

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Help Splitting Simple String

    Split returns all values (apart from your delimiters), you are probably just not reading all the values.

    Try this:
    VB Code:
    1. Dim intCounter as Integer
    2.   For intCounter = 0 To UBound(varFlds)
    3.     MsgBox varFlds(intCounter)
    4.   Next intCounter

Posting Permissions

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



Click Here to Expand Forum to Full Width