Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split a memo field into separate fields by line break

Status
Not open for further replies.

leftfldr

Programmer
Mar 30, 2005
23
US
Using Crystal 10, SQL 2005, GP Dynamics backend database

I have a memo field that I need to split into separate fields for the purpose of formatting. For example, my field reads:
"Repair Only - 90 Day Warranty (hard return)
Specify Tilt & Lighting Volts"

I need the words Specify Tilt & Lighting Volts to be italic.
I have several of these instances and the words are not always the same.

Can I split the memo field into separate lines by hard return so I can format just the 2nd lines to italic?

Thanks in advance
 
Please explain what you did so others can benefit from this thread.

-LB
 
Make two formulas (I know that my text field only has one hard return)

Split1:
If INSTR((table field), chr(13)) > 0
then LEFT((table field), INSTR((table field), chr(13)))
else ''

Split2:
If INSTR((table field)), chr(13)) > 0 then
MID((table field), INSTR ((table field), chr(13)) +1)

Now I have two separate fields and I can format the second field as I wish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top