[AccessD] How to Split a Text Field into Smaller Segments
McGillivray, Don
DMcGillivray at ctc.ca.gov
Fri Jul 17 10:50:42 CDT 2015
Hi Brad,
Use the Split() function. It populates an array with the elements of your delimited string:
MyArrayVariable = Split("<MyDelimitedString>","<MyDelimiter>")
MyArrayVariable = Split("AA|BBB|CDFF|XFEDD","|")
Then you can iterate through the array as necessary.
Don
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Brad Marks
Sent: Friday, July 17, 2015 8:26 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] How to Split a Text Field into Smaller Segments
All,
In order to analyze the data that is contained in a text field, I need to break the data in the field into smaller segments.
There is a vertical bar "|" separating each smaller segment.
Example -
AA | BBB | CDFDFF | XFEDD
I would like to extract each smaller segment of the string and end up with four fields (for this example)
AA
BBB
CDFDFF
XFEDD
If there an easy way to do this with VBA?
Thanks,
Brad
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list