|
-
Jun 16th, 2006, 12:24 PM
#1
[RESOLVED] Ingoring comma, where comma is the delimiter VBA (access)
I am having a problem; I have a string as follows:
FirstName,LastName,PostalCode,"some address, with comma", whatever
I am using the split function to break it down into an array. The problem I am having, is the array comes out like this:
FirstName
LastName
PostalCode
"some address
with comma"
whatever
The output I would like, is to have it like this
FirstName
LastName
PostalCode
"some address, with comma"
whatever
All addresses that contain commas will be encased with ".
*edit*
Sorry, It is not just the address that may contain commas, any field may. Although any field wit a comma that is not meant to be used as a delimiter will be encased in "'s.
*end edit*
I am reading the string in 1 line at a time before I actually split by the delimiter.
Sorry I cant post any code, as I am at work atm..but pseudocode is
VB Code:
Do While NOT EOF
textLine = ReadLine (bleh.txt)
splitLinex = Split(textline,",")
Loop
Thanks,
Smitty
Last edited by kfcSmitty; Jun 16th, 2006 at 12:49 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|