parsing text in a field

  • Thread starter Thread starter Paulb9
  • Start date Start date
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?
 
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
 
While the reports are fairly standardized, they are not exact. Cannot know
exactly ahead of time where the text will appear.
 
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
 
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
 
Back
Top