By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,480 Members | 1,231 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,480 IT Pros & Developers. It's quick & easy.

Replace function - odd problem

P: n/a
I have an Access 2K application that is distributed to about a dozen
users (all with identical NT environments and identical Access
versions, object libraries and service packs). I am using the VBA
Replace function in a couple of queries to reformat some data. The
application works flawlessly on 8 of the workstations, but on the
other 4 throws a "Unrecognized function Replace" error when the
queries in question are encountered.

I have worked around the problem by implementing the required replace
functionality in code and eliminating the Replace function altogether,
but as a matter of curiosity, can anybody explain why this might be
happening?

Thanks
Dave
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Likely a References problem.

This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

For far more than you could ever want to know about this problem, check out
http://members.rogers.com/douglas.j....nceErrors.html

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Dave" <dg*****@erols.com> wrote in message
news:8d**************************@posting.google.c om...
I have an Access 2K application that is distributed to about a dozen
users (all with identical NT environments and identical Access
versions, object libraries and service packs). I am using the VBA
Replace function in a couple of queries to reformat some data. The
application works flawlessly on 8 of the workstations, but on the
other 4 throws a "Unrecognized function Replace" error when the
queries in question are encountered.

I have worked around the problem by implementing the required replace
functionality in code and eliminating the Replace function altogether,
but as a matter of curiosity, can anybody explain why this might be
happening?

Thanks
Dave

Nov 13 '05 #2

P: n/a
Dave, I don't have a solution for you, but thought you might like to know
that I have seen the identical problem. It's only been on a small
percentage of about 80 systems, all of which are running the identical .mde.
It's so sporadic that I haven't been able to clearly identify a fix, but I
think re-running, either the MDAC update or the Office 2000 service pack,
fixes it.
"Dave" <dg*****@erols.com> wrote in message
news:8d**************************@posting.google.c om...
I have an Access 2K application that is distributed to about a dozen
users (all with identical NT environments and identical Access
versions, object libraries and service packs). I am using the VBA
Replace function in a couple of queries to reformat some data. The
application works flawlessly on 8 of the workstations, but on the
other 4 throws a "Unrecognized function Replace" error when the
queries in question are encountered.

I have worked around the problem by implementing the required replace
functionality in code and eliminating the Replace function altogether,
but as a matter of curiosity, can anybody explain why this might be
happening?

Thanks
Dave

Nov 13 '05 #3

P: n/a
On 1 Jul 2004 10:52:24 -0700, Dave wrote:
I have an Access 2K application that is distributed to about a dozen
users (all with identical NT environments and identical Access
versions, object libraries and service packs). I am using the VBA
Replace function in a couple of queries to reformat some data. The
application works flawlessly on 8 of the workstations, but on the
other 4 throws a "Unrecognized function Replace" error when the
queries in question are encountered.

I have worked around the problem by implementing the required replace
functionality in code and eliminating the Replace function altogether,
but as a matter of curiosity, can anybody explain why this might be
happening?

Thanks
Dave


Assuming it's not a common reference problem ....
I've not had to deal with this personally, but if memory serves me
correctly, there were some versions of Access 2000 in which the
Replace function would not be recognized in a query, but which would
work in a code module.
The work around is to write a module using the replace function:

Function Workaround(StringIn)
Workaround = Replace(StringIn,"abc","xyz")
End Function

Then in the query:
Exp:Workaround([FieldName])

Try it and let me know if my memory is O.K., or if I should stop
staying up so late.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.