Delimited Field Data (From Inherited Table)

  • Thread starter Thread starter ThePandaManCan
  • Start date Start date
T

ThePandaManCan

Hello,

I'm trying to create a report based on data retrieved from tables
that I have no way to modify. Most of the fields are single-value, but
one field in particular has six or seven pieces of information
delimited by pipe symbols. How would I go about pulling each piece of
information out of this field into its own part on the report?

For example: F|X|G| |Y would come out:
Item 1: F
Item 2: X
Item 3: G
Item 4:
Item 5: Y

Thanks!
-PandaMan
 
Have a look at the VBA Split() Function

It does all the hard work for you. Here an Example

Dim a() As String, i as Integer
a = Split(strColumData, "|")
For i = 0 To UBound(a)
Debug.Print "Item " & i & ":" & a(i)
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top