Link to home
Start Free TrialLog in
Avatar of jturin
jturin

asked on

Replace function not working in MS Access 2000

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
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<<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.
Avatar of jturin
jturin

ASKER

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

Thanks - Jeff