Solved

HOw to parse multiple text data into seperate fields

Posted on 2014-03-12
2
395 Views
Last Modified: 2014-03-12
I am analyzing survey data that I have imported into Access.  One field has multiple text strings (up to six) separated by semi colons.  I am looking for the easiest way to parse this field into multiple fields.  Thanks for any insight.
0
Comment
Question by:Sbovino
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39925141
use a function like this

Function fnParseInfo(vString As Variant, idx As Integer, Optional Delimiter As String = ";") As String

   Dim myArray() As String
   myArray = Split(vString, Delimiter)

   If idx < 0 Or idx > UBound(myArray) + 1 Then
      fnParseInfo = "Null"
  Else
      fnParseInfo = myArray(idx - 1)

   End If

End Function

see this similar thread

http://www.experts-exchange.com/Database/MS_Access/Q_28255071.html#a39537854
0
 

Author Closing Comment

by:Sbovino
ID: 39925307
Thanks.  That solved it!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question