If the fields are fixed length then you can use the Left, Right, and Mid functions to split the data out...otherwise you're stuck with running through code and dividing it up (check out the InStr function, you're gonna need that). Hope that helps.
If the pipe delimiter is actually part of the field, you can use the "SPLIT" function (Ms. A. 2K & later). Otherwise search these fora for "basSplit" and use it instead. Generally, the parseing of name fields is hazzardous, so you should check that each record includes the same number of seperators, and -if not- the issue becones more complicated.
Where did this data come from? Any chance you can import it again (not read it from a table) and dump it to a table right away using some import specs to divide up the data?
Try importing the table into another access database using a spec with the |(pipe), creating a table. You can then import/export the new table into your original database.
Teh Ubiquitous {F1} (aka HELP) has the info. The only 'tricky' part is that the variable to which the return is assigned must either already be an array (of string) or a variant (to which an array may be assigned).
e.g.
[tab]Dim MyAry as Variant
[tab]Dim MyStr as String
[tab]MyStr = "The quick brown dog jumped over the lazy red Fox."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.