Solved

Replace function not working in MS Access 2000

Posted on 2004-04-29
3
5,407 Views
Last Modified: 2012-05-04
I have encountered this problem before and have only a sketchy idea about its causes/resolution.

I use the Replace(string, string, string, param, param, param) funtion as part of a calculated expression in a control source of a text box in an MS Access 2000 report.

It works just fine on 8 out of 9 workstations.  

On one workstation, however, it acts as if Replace is not a valid function name - prompting for a value as if "Replace" was an unknown field or parameter when the report is opened.

My on-site technical contact ( I work remotely from the deployment site ) resolved this issue on another machine seemingly by installing updated VB 6 dlls.  However, he assures me that he has done the same and that all references (in Access VBA code design) on both a working machine and the non-working one are the same, all patches and updates have been applied.

The machines on site are Win 98.  (My development and test machines are Win XP Pro and Win 2000 Pro).

I tried with and without $ sign - "Replace(...)" and "Replace$(...)"  

I also tried adding in the 3 final, optional parameters - Replace(string, string, string, 1, -1, 1)

Any ideas?

Thanks, Jeff
0
Comment
Question by:jturin
3 Comments
 
LVL 50

Accepted Solution

by:
Steve Bink earned 50 total points
ID: 10951887
I know the Replace function is found in VBE6.DLL.  The default installation path for this file is:

C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL

Have you compared versions?
0
 
LVL 57
ID: 10952667
<<Any ideas?>>

 Check references.  Open a module in design view on one of the problem stations, then click tools/references.  Look for any listed as MISSING or BROKEN.  If so you'll need to find out why.  If none are, do the following:

1. Check any unchecked reference
2. Close the module and save
3. Close the database and exit Access
4. Reopen and uncheck the reference just checked.
5. Compile (should be clean) and save and exit.

Jim.
0
 

Author Comment

by:jturin
ID: 11100427
I ended up manually replacing the vb6e.dll file after uninstalling and reinstalling did not resolve the problem.  The manual replacement worked.

Thanks - Jeff
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now