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 » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old May 21st, 2004, 04:48 AM
KRISH
external usenet poster
 
Posts: n/a
Default Replace( ) Prob......... help please

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

  #2  
Old May 21st, 2004, 01:29 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default Replace( ) Prob......... help please

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)," ")


--
Duane Hookom
MS Access MVP


"KRISH" wrote in message
...
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



  #3  
Old May 21st, 2004, 01:37 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default Replace( ) Prob......... help please

KRISH wrote:
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
--
Marsh
MVP [MS Access]
 




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 11:36 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.