parsing text in a field

P

Paulb9

I have a form that among other things has three memo fields containing
fairly standardized reports. Using the OnCurrent Prop of the form I want to
parse each of these reports looking for very specific text strings. For
example:
If memo-field1 contains string1 and string2 and string3 and string4 set
background color to green, else set to red. Is the LIKE function the best
tool for this job?
 
J

Jonathan Parminter

Paul said:
-----Original Message-----
I have a form that among other things has three memo fields containing
fairly standardized reports. Using the OnCurrent Prop of the form I want to
parse each of these reports looking for very specific text strings. For
example:
If memo-field1 contains string1 and string2 and string3 and string4 set
background color to green, else set to red. Is the LIKE function the best
tool for this job?

Hi Paul, use online help for information on the functions:
InStr()
Mid()
Left()
Right()
Len()

Luck
Jonathan
 
P

Paulb9

While the reports are fairly standardized, they are not exact. Cannot know
exactly ahead of time where the text will appear.
 
J

John Vinson

While the reports are fairly standardized, they are not exact. Cannot know
exactly ahead of time where the text will appear.

The InStr() function will return the position of the text. For
instance the expression

If InStr("string1", [memofield]) > 1

will be True if "string1" appears anywhere within the memo field.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
P

Paulb9

Cool, thanks!
John Vinson said:
While the reports are fairly standardized, they are not exact. Cannot know
exactly ahead of time where the text will appear.

The InStr() function will return the position of the text. For
instance the expression

If InStr("string1", [memofield]) > 1

will be True if "string1" appears anywhere within the memo field.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 

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

Top