parsing a memo field

G

Guest

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.
 
K

Ken Snell \(MVP\)

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?
 
J

John Nurick

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

fredg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top