Re: extracting data

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jack (Jack_at_discussions.microsoft.com)
Date: 11/30/04


Date: Tue, 30 Nov 2004 05:29:25 -0800

Alex,
Thank you so much for the quick reply. Your solution would work if i had
only one memo box (comments). For some reason in frontpage form it wants to
place the memo box fields at the end. I apoligize for not giving enough
details.

here is a sample of the email i get:
first name: joe
last name: blow

comments: <------------notice how the memo fields automatically drop
chr(13)after the single fields.----------------

here is where comments actual start
second line of comments.

other_details:

here is where second memo starts
second line goes here.

I have tried replacing chr(13) in numerious places within code without a
positive result. As I mentioned before, the single fields work great. Its
only where there are 2 chr(13) between the field name and field value inside
of the email.
The form / email that comes in is in formatted text. I have tried to change
it to comma delimited but then I believe there would be problem if all fields
were not filled in.

Any further assistance / expertise you could provide would be greatly
appreciated.

Thank you,
Jack

"Alex Dybenko" wrote:

> Hi Jack,
> try something like this
> get start of comments:
> StartLine = InStr(textLine, "comments:")
>
> get rest of message:
>
> strCommnents=mid(textLine, StartLine +10)
>
> replace CHR(13) with space
>
> strCommnents=replace(strCommnents,CHR(13)," ")
>
> HTH
> --
> Alex Dybenko (MVP)
> http://Alex.Dybenko.com
> http://www.PointLtd.com
>
>
>
>
> "Jack" <Jack@discussions.microsoft.com> wrote in message
> news:978C0CCB-AFEA-4485-88CD-D9C249383746@microsoft.com...
> >I am using the following routine to extract data from email(web form) form.
> > The routine works great for single fields however if a field in the
> > webform
> > is a memo box. it doesnt work for that field. I believe its because there
> > are
> > multiple CHR(13) between the fields. For Example the email I get looks
> > like
> > this:
> >
> > First name: xxxx
> > last name: xxx
> > comments:
> >
> > xxx this is where comments start.
> > xxxx and continue
> > xxxx and continue
> >
> > Can someone take a look at this sniplet and tell me what is the best way
> > to
> > correct this? Code follows:
> >
> > Public Function ExtractDetail(textLine As Variant, FormItemReq As String)
> > As
> > Variant
> >
> > Dim StartLine As Variant, EndLine As Variant, ExtractText As Variant
> >
> > StartLine = InStr(textLine, FormItemReq)
> > If StartLine > 0 Then
> >
> > StartLine = StartLine + Len(FormItemReq)
> > EndLine = InStr(StartLine, textLine, Chr(13))
> > ExtractText = Mid(textLine, StartLine, EndLine - StartLine)
> >
> > End If
> > If Len(ExtractText) = 0 Then ExtractText = ""
> >
> > ExtractDetail = Trim(ExtractText)
> >
> > End Function
> >
> >
> > Thanks, Jack
> >
>
>
>



Relevant Pages

  • Re: extracting data
    ... Alex Dybenko ... "Jack" wrote in message ... > place the memo box fields at the end. ... >>> Public Function ExtractDetail(textLine As Variant, ...
    (microsoft.public.access.modulesdaovba)
  • Re: [Delphi 6] How can i copy a DbMemo to a Memo?
    ... I have to manipulate a DbMemo in a file and copy it in a Memo. ... Table.FieldByName.Value is a Variant. ... but i have an error: Access violation at adress ... I'll try with a component Ttable BDE during the week-end! ...
    (alt.comp.lang.borland-delphi)
  • Re: [Delphi 6] How can i copy a DbMemo to a Memo?
    ... I have to manipulate a DbMemo in a file and copy it in a Memo. ... Table.FieldByName.Value is a Variant. ... but i have an error: Access violation at adress ...
    (alt.comp.lang.borland-delphi)
  • Re: [Delphi 6] How can i copy a DbMemo to a Memo?
    ... I have to manipulate a DbMemo in a file and copy it in a Memo. ... Table.FieldByName.Value is a Variant. ...
    (alt.comp.lang.borland-delphi)