Re: Extract Data
- From: "JohnFol" <OutlookExpress@xxxxxxxxxxxxxxxx>
- Date: Wed, 20 Apr 2005 14:50:08 GMT
Depends where you are doing it, and if you can guarantee the quotes will be
there. For eexample ina query you can use:
Instr will return the position of the first quote
Using this value do another Instr to get the 2nd quote
Use Mid to extract out the section you want.
Or, do this if in VBA
Function GetMiddleBit(strInput as string) as string
Dim strResults() As String
strResults = Split( " " & strInput & " ", Chr(34))
GetMiddleBit = strResults(1)
End Function
and to test
Dim strTest As String
strTest = GetMiddleBit("Hello " & Chr(34) & "world" & Chr(34) & " How are
you?")
"Tony" <Tony@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:185794A8-CA08-4CA9-A0C5-D61357F77B00@xxxxxxxxxxxxxxxx
>I need to extract a portion of a text field and I don't have a clue how to
>do
> it. I know it can be done because I recall seeing someone else do it but
> for
> the life of me I cannot remember.
>
> Basically I have a text field that contains some information in the middle
> of it that is surounded by quotes and I need to extract only that part.
> Can
> someone tell me how I can extract it?
>
> Thank you in advance,
> Tony
.
- References:
- Extract Data
- From: Tony
- Extract Data
- Prev by Date: Re: Most recent
- Next by Date: Query in a list box moved to sql
- Previous by thread: Extract Data
- Next by thread: RE: Extract Data
- Index(es):
Relevant Pages
|