Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Feb 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    undefined function (Access 2000/W98)

    Can anybody help? I have a simple access query that replaces one field with another.
    If I run it on an XP machine it works fine...but when it is run on a Windows 98 machine
    I get the error... 'Undefined function "replace" in expression". Does anybody have any
    idea how to solve this problem/error.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: undefined function (Access 2000/W98)

    This is usually a "missing references" problem. It must be resolved on the problem PC.

    Open the database. If necessary, keep down Shift while opening the database, to bypass startup options.
    Activate the Visual Basic Editor (Alt+F11).
    Select Tools | References...
    Probably, one or more checked references will start with MISSING.
    Select them and not what they refer to in the lower half of the dialog.
    Clear the check box for each of the missing references, then click OK.
    Switch back to Access to test if the query runs now.
    If not, you will have to find where the missing references are to be found on that PC. For instance, the system folder is C:WindowsSystem32 on Windows XP, but C:WindowsSystem on Window 98, I think.

  3. #3
    New Lounger
    Join Date
    Feb 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: undefined function (Access 2000/W98)

    Thanks...nothing says missing...Im not sure what i should be looking for in the system folder

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: undefined function (Access 2000/W98)

    If there are no missing references, you don't need to go looking in the system folder. Your subject says Access 2000. In the first post, you wrote that the database runs fine on an "XP machine" but errors on a Windows 98 machine. I assumed that you meant Windows XP, but did you perhaps mean Office XP? The Replace function works fine in expressions in Access 2002, but not in Access 2000, I believe (I don't have Access 2000 myself).

    If you use the Replace function in a query, you might try the following workaround: create a "wrapper" function in a standard module:

    Public Function MyReplace(strIn As String, strOld As String, strNew As String) As String
    MyReplace = Replace(strIn, strOld, strNew)
    End Function

    and use MyReplace instead of Replace in queries. (I got this suggestion from the MS Newsgroups)

  5. #5
    New Lounger
    Join Date
    Feb 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: undefined function (Access 2000/W98)

    Hans...

    Thank you...thank you...thank you... I have been struggling with this problem for a month. I really appreciate your expertise!!!

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: undefined function (Access 2000/W98)

    Replace() was introduced in Access 2000, along with Split() and Join(). If Replace() isn't working in Access 2000, something else is wrong. Of course if you open an Access 97 database in Access 2000, you can't use Replace(), since it didn't exist in Access 97.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •