On Sun, 12 Apr 2009 17:43:27 +0700, "SF" <(E-Mail Removed)> wrote:
>Hi,
>
>I have a form contain a memo field in RTF. I want to find the "~" and
>replace the character with the enter key. The code below work for current
>record, how do I move from first to the record end to replace the "~"
>
>Private Sub cmdReplaceEvidence_Click()
> Me.Evidence = Replace(Me.Evidence, "~", "</div><div>")
>End Sub
>
>SF
>
Do you want to do this replacement on a Form? If so, it will replace in the
current record on the Form.
Or do you want to replace the data in a Table? A form is merely a window to
display data stored in a table; if you want to replace all the ~ characters in
the memo field in the entire table, run an Update Query instead:
UPDATE yourtablename
SET [Evidence] = Replace([Evidence], "~", "</div><div>")
WHERE [Evidence] LIKE "*~*");
Save this query and execute it from the command button's click event.
--
John W. Vinson [MVP]
|