PC Review


Reply
Thread Tools Rate Thread

How to I move to next record?

 
 
SF
Guest
Posts: n/a
 
      12th Apr 2009
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


 
Reply With Quote
 
 
 
 
Stefan Hoffmann
Guest
Posts: n/a
 
      12th Apr 2009
hi,

SF wrote:
> 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 <--
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      12th Apr 2009
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]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "Next" button to move the user to the next sheet Rob Microsoft Excel Misc 2 29th Mar 2009 12:14 PM
Nvidia's Ageia Purchase - Why Ageia matters - Next Generation SonyPlayStation GPU - Next Generation PC GPUs - Next Generation Console GPU -Nvidia Inside - Nvidia Everywhere sprite scaler AMD 64 Bit 0 8th Feb 2008 02:43 AM
Nvidia's Ageia Purchase - Why Ageia matters - Next Generation SonyPlayStation GPU - Next Generation PC GPUs - Next Generation Console GPU -Nvidia Inside - Nvidia Everywhere sprite scaler ATI Video Cards 0 8th Feb 2008 02:43 AM
Nvidia's Ageia Purchase - Why Ageia matters - Next Generation SonyPlayStation GPU - Next Generation PC GPUs - Next Generation Console GPU -Nvidia Inside, Nvidia Everywhere sprite scaler Video Cards 0 8th Feb 2008 02:41 AM
Want to copy a cell down until it comes to the next nonblank cell, and then take this next nonblank cell until it comes to the next nonblank cell, and so on... GretOgrady Microsoft Excel Discussion 2 5th Jan 2005 09:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:03 PM.