How to I move to next record?

S

SF

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
 
S

Stefan Hoffmann

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 "~"
You may take a look at DoCmd.GoToRecord.


mfG
--> stefan <--
 
J

John W. Vinson

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.
 

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