Hi Partha,
(could you respond to the post instead...that way other readers can see
your reply... thanks)
Partha Mandayam said:
i just want to search a particular string in all reports and replace
with another. as per your code i must have the same text box control
news:
[email protected]...
When you say search a string I guess you are stating you would like to
search a string that resides in some type of control in your Report (can't
have a string that's not in a control e.g., textbox or label)
If for instance your string is "the cow jumped over the moon" and it
resides in every Report but in each Report it resides in different textbox
control (as an example) then you can use the below solution to Loop thru
the controls in a Report/Form, and combine it with the solution below to
replace a string with another string.
210252 ACC2000: How to Use Code to Cycle Through the Controls on a Form
http://support.microsoft.com/?id=210252
(same for Reports)
210465 ACC2000: How to Replace a String with Another String
http://support.microsoft.com/?id=210465
Without writing the code it would entail the following:
For Each rpt In CurrentProject.AllReports
' open Report in design (see previous post)
' use code in 210252 to loop thru
Controls
' use code in 210465 to
replace string
' end of code in 210252
' close Report (see previous post)
Next rpt
If you are not into writing the VBA code Speed Freet (not sure of the
spelling) has software that does such things..... search google.com.
Thanks..