View Full Version : How to extract just the first paragraph of a memo field


eomurlu
01-23-2006, 02:33 AM
Does anyone have an idea how to extract the first paragraph of a memo field of a table to be used in a query? Thanks...

Jon K
01-23-2006, 02:21 PM
NewField: IIf(instr([MemoField],chr(13)), left([MemoField],instr([MemoField],chr(13))-1), [MemoField])
.

eomurlu
01-24-2006, 10:06 AM
Would you please explain the expression a little, since I am getting an error when I write this to a new field in a Query. Memofield is the field that I want to collect the first paragraph I guess. However, chr(13) is the one I was puzzled. The error is about the comma before the first chr(13). Thanks a lot...

Rickster57
01-24-2006, 11:31 AM
I tried the formula and it worked perfectly.
Very nice indeed Jon K!!

eomurlu
01-24-2006, 02:21 PM
Only after did I change the commas to semi comma, it worked. Thanks Jon K:)

EMP
01-24-2006, 03:05 PM
I think whether you should use comma or semi colon as the argument separator in a function entirely depends on the version of Windows you are using. Most Windows versions use comma.

^