Replace( ) Prob......... help please

  • Thread starter Thread starter KRISH
  • Start date Start date
K

KRISH

Hi!

I am using Replace() in control source of a TextBox of my
report as

=Replace([App-PrincipalAddress],Chr(13) & Chr(10)," ")

Problem is if i open the report, it is asking a paramater
for Report(). This problem is coming on machine Office
2000. But the same is working fine on Office XP. Kindly
help how to solve the problem on Office 2000. Thanks for
any help

Krish
 
I believe Replace() will work in code and was left out of queries and other
expressions. You may need to create your own "wrapper" for the function:
Function ReplaceIt(psText as String, psFind as String, psSubs as String) as
String
ReplaceIt=Replace(psText , psFind , psSubs )
End Function
Then, set your control source to
=ReplaceIt([App-PrincipalAddress],Chr(13) & Chr(10)," ")
 
KRISH said:
I am using Replace() in control source of a TextBox of my
report as

=Replace([App-PrincipalAddress],Chr(13) & Chr(10)," ")

Problem is if i open the report, it is asking a paramater
for Report(). This problem is coming on machine Office
2000. But the same is working fine on Office XP. Kindly
help how to solve the problem on Office 2000.


In the original release of A2K, the Replace function was
inadvertantly omitted from the expression service's name
space. I don't know if it was corrected in a later service
release, but you should make sure you're up to date on all
the O2K fixes anyway.

The workaround was to create a Public Function (in a
standard module) as a wrapper that can be called from
control source and query expressions.

Public Function fReplace( . . .
fReplace = Replace( . . .
End Function
 
Back
Top