Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / December 2005

Tip: Looking for answers? Try searching our database.

Replace not working in report on some systems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LisaConsult - 01 Dec 2005 20:19 GMT
I have an MDE application which tested fine on a test machine and is
installed in several locations without any problems.  We recently installed
it at a client site and they are receiving a "Enter Parameter value Replace"
any time they run a report which uses "=Replace(....)" in the Text field.  In
all cases we install Access Runtime 2000 SR-3.  Some OS's are XP, others are
2000 and they work fine.  This problem is occurring on a 2000 machine.  What
are they missing or what would cause this problem?  Thanks
Allen Browne - 02 Dec 2005 02:03 GMT
There is a known issue with these functions on Access 2000:
   FormatCurrency(),
   FormatDateTime(),
   FormatNumber(),
   FormatPercent(),
   InStrRev(),
   MonthName(),
   Replace(),
   Round(),
   StrReverse(),
   WeekdayName()
Microsoft has an k.b. article covering this:
   http://support.microsoft.com/?id=225956

You would expect that a fully patched A2000 machine (both SR3 for Office
2000 and SP8 for JET 4) would not have the problem. I got caught also: my
dev machines do not have the problem, but a fully patched client does!

I was not able to identify the difference. (Perhaps it's because I have
later versions of Access on my machines as well?)

The workaround is to create a a wrapper function in VBA, and call that
instead:

Function ReplaceX(varIn As Variant, strFind As String, strReplace As String,
_
Optional lngStart As Long = 1, Optional lngCount As Long = -1) As Variant
   'Purpose:   Wrapper for Replace() which has problems in Access 2000.
   '           Also handles nulls (in and out.)

   If Len(varIn) > 0& Then
       ReplaceX = Replace(varIn, strFind, strReplace, lngStart, lngCount)
   Else
       ReplaceX = Null
   End If
End Function

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I have an MDE application which tested fine on a test machine and is
> installed in several locations without any problems.  We recently
[quoted text clipped - 8 lines]
> What
> are they missing or what would cause this problem?  Thanks
LisaConsult - 08 Dec 2005 04:10 GMT
Thanks for the info.  Based on the content of the article, I don't understand
why it does work on some machines which only have ART, but making the code
change as suggested does work.  I appreciate your assistance.

> There is a known issue with these functions on Access 2000:
>     FormatCurrency(),
[quoted text clipped - 45 lines]
> > What
> > are they missing or what would cause this problem?  Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.