Separating strings in a field to separate fields

  • Thread starter Thread starter jseger22
  • Start date Start date
J

jseger22

Hi,

I have a field that consists of a string value that looks like Item1,
Item2, Item3, each item is separated by commas. I want to separate
that string value so that each item has its own field. Is there code
that will easily do this?

Thanks,
Jaime
 
Hi,

I have a field that consists of a string value that looks like Item1,
Item2, Item3, each item is separated by commas. I want to separate
that string value so that each item has its own field. Is there code
that will easily do this?

Thanks,
Jaime

Yes... but it differs depending on the circumstances. Are there always exactly
three items? An arbitrary number of items? Is there always at least one comma
or might some records have none?

Take a look at the VBA help for InStr, Mid, and Split and post back with a bit
more detail (and perhaps an example) if you need more help.

John W. Vinson [MVP]
 
Yes... but it differs depending on the circumstances. Are there always exactly
three items? An arbitrary number of items? Is there always at least one comma
or might some records have none?

Take a look at the VBA help for InStr, Mid, and Split and post back with a bit
more detail (and perhaps an example) if you need more help.

John W. Vinson [MVP]

There will always be a max of three items and they will always but
separated by commas. I was trying to do this with the Split function
but I am only a beginner with VBA so I am having some troubles. If
you could help me out with an example that would be much appreciated.
Thanks!
 
Back
Top