A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to Search and replace a string with formatted text?



 
 
Thread Tools Display Modes
  #1  
Old April 6th, 2009, 04:00 AM posted to microsoft.public.access
SF[_3_]
external usenet poster
 
Posts: 90
Default How to Search and replace a string with formatted text?

Hi,

I have a project workplan table consist of 4 fields (PWID (PK), Pr_ObjectID
(FK), Activity (memo), Evidence (Memo)). The last two fields are set to use
access 2007 RTF and they store work in Khmer (Cambodian Font). What I want
to do is to do automated search thru each field and find a word TT and
replace with CMC in english font.

I cannot find a way to do that automatically, could someone help? What I am
doing now is to press Ctl + F, find the spedific string, close the find
dialog and paste the desire string (CMC). This process is very slow.

SF


  #2  
Old April 6th, 2009, 12:08 PM posted to microsoft.public.access
Software-Matters
external usenet poster
 
Posts: 13
Default How to Search and replace a string with formatted text?

Hi,
You are doing the right thing but missing a step as follows:

Use Ctrl-F to open the Find and Replace window.
Click on the Replace tab and enter the text to find and text to replace as
desired. Now click Replace All.

Regards
JD
--
a
href="http://www.software-matters.co.uk/bespoke-database-design.html"Bespoke
Access Database Development/a
pSoftware Matters/br
Straightforward solutions that work/p


"SF" wrote:

Hi,

I have a project workplan table consist of 4 fields (PWID (PK), Pr_ObjectID
(FK), Activity (memo), Evidence (Memo)). The last two fields are set to use
access 2007 RTF and they store work in Khmer (Cambodian Font). What I want
to do is to do automated search thru each field and find a word TT and
replace with CMC in english font.

I cannot find a way to do that automatically, could someone help? What I am
doing now is to press Ctl + F, find the spedific string, close the find
dialog and paste the desire string (CMC). This process is very slow.

SF



  #3  
Old April 6th, 2009, 12:08 PM posted to microsoft.public.access
Paul Shapiro
external usenet poster
 
Posts: 635
Default How to Search and replace a string with formatted text?

I don't understand what you mean by "TT" and "CMC", but generally you can
replace strings in a single operation using Ctrl-H (replace) instead of
Ctrl-F (Find). That will give you a dialog with the option of replacing all
occurences in the current field in the current record.

If you want to do this in all rows of data, use an Update Query instead,
something like:

Update WorkPlan
Set
Activity = Replace([Activity], "string-to-find",
"string-to-use-as-replacement")
,Evidence = Replace([Evidence ], "string-to-find",
"string-to-use-as-replacement")

If this is a large table and less than half the rows contain your strings,
you could optimize a bit by using two queries:

Update WorkPlan
Set
Activity = Replace([Activity], "string-to-find",
"string-to-use-as-replacement")
Where Instr([Activity], "string-to-find") 0

and equivalent for the other field.

"SF" wrote in message
...
Hi,

I have a project workplan table consist of 4 fields (PWID (PK),
Pr_ObjectID (FK), Activity (memo), Evidence (Memo)). The last two fields
are set to use access 2007 RTF and they store work in Khmer (Cambodian
Font). What I want to do is to do automated search thru each field and
find a word TT and replace with CMC in english font.

I cannot find a way to do that automatically, could someone help? What I
am doing now is to press Ctl + F, find the spedific string, close the find
dialog and paste the desire string (CMC). This process is very slow.


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:17 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.