A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

parsing a memo field



 
 
Thread Tools Display Modes
  #1  
Old December 17th, 2006, 06:55 AM posted to microsoft.public.access.gettingstarted
Kai Leon
external usenet poster
 
Posts: 1
Default parsing a memo field

i am trying to parse a memo field in an existing database to many fields. i
have memo field of 6000 characters. The data in the memo has key words that
I would like to parse on. As an example, the words "Description" and "Tasks"
are placed above large pieces of text. I want to take all of the text after
"Description" and before "Tasks and place it in a separate field.

Any help you can give would be appreciated.
  #2  
Old December 17th, 2006, 01:23 PM posted to microsoft.public.access.gettingstarted
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default parsing a memo field

Does the word Tasks possibly exist in the text between the Description text
header and the Text text header? Can you show us an example of the data that
are in the memo field?

--

Ken Snell
MS ACCESS MVP

"Kai Leon" Kai wrote in message
...
i am trying to parse a memo field in an existing database to many fields. i
have memo field of 6000 characters. The data in the memo has key words
that
I would like to parse on. As an example, the words "Description" and
"Tasks"
are placed above large pieces of text. I want to take all of the text
after
"Description" and before "Tasks and place it in a separate field.

Any help you can give would be appreciated.



  #3  
Old December 17th, 2006, 05:33 PM posted to microsoft.public.access.gettingstarted
John Nurick
external usenet poster
 
Posts: 492
Default parsing a memo field

And are the same headings (what you called key words) always present and
always in the same order?

On Sun, 17 Dec 2006 08:23:54 -0500, "Ken Snell \(MVP\)"
wrote:

Does the word Tasks possibly exist in the text between the Description text
header and the Text text header? Can you show us an example of the data that
are in the memo field?


--
John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
  #4  
Old December 17th, 2006, 05:34 PM posted to microsoft.public.access.gettingstarted
fredg
external usenet poster
 
Posts: 4,386
Default parsing a memo field

On Sat, 16 Dec 2006 22:55:00 -0800, Kai Leon wrote:

i am trying to parse a memo field in an existing database to many fields. i
have memo field of 6000 characters. The data in the memo has key words that
I would like to parse on. As an example, the words "Description" and "Tasks"
are placed above large pieces of text. I want to take all of the text after
"Description" and before "Tasks and place it in a separate field.

Any help you can give would be appreciated.


If you are looking to parse from the first instance of the word
"Description" to the first instance of the word "Task", then:

NewField =
Mid([Paragraph],InStr([Paragraph],"Description"),InStr([Paragraph],
"Task") -InStr([Paragraph],"Description"))

The above will include the word "Description" but exclude the word
"Task".

To exclude the word "Description" change the above expression to:

NewField = Mid([Paragraph],InStr([Paragraph],"Description")+12 ,
InStr([Paragraph],"Task")-InStr([Paragraph],"Description") -12)

Change [paragraph] to whatever the actual name of your Memo field is.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #5  
Old December 18th, 2006, 05:01 PM posted to microsoft.public.access.gettingstarted
Kai Leon
external usenet poster
 
Posts: 1
Default parsing a memo field

Fred, thank you. It worked.

"fredg" wrote:

On Sat, 16 Dec 2006 22:55:00 -0800, Kai Leon wrote:

i am trying to parse a memo field in an existing database to many fields. i
have memo field of 6000 characters. The data in the memo has key words that
I would like to parse on. As an example, the words "Description" and "Tasks"
are placed above large pieces of text. I want to take all of the text after
"Description" and before "Tasks and place it in a separate field.

Any help you can give would be appreciated.


If you are looking to parse from the first instance of the word
"Description" to the first instance of the word "Task", then:

NewField =
Mid([Paragraph],InStr([Paragraph],"Description"),InStr([Paragraph],
"Task") -InStr([Paragraph],"Description"))

The above will include the word "Description" but exclude the word
"Task".

To exclude the word "Description" change the above expression to:

NewField = Mid([Paragraph],InStr([Paragraph],"Description")+12 ,
InStr([Paragraph],"Task")-InStr([Paragraph],"Description") -12)

Change [paragraph] to whatever the actual name of your Memo field is.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.