Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Johannesburg, Gauteng, South Africa
    Posts
    104
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unrecognised function (A2K-SR1)

    Hi,

    I have obviously done something strange to cause the following :

    I have a split db, both parts residing on a server. When a particular form loads, some code is run. The offending line is simply : (Element is a string var)

    Element = Replace(Element, "cbo", "")

    When I open the db from 3 of the four machines that will use this app, there is no problem. On the 4th machine, I get a "run time error 5" and when I go into debug, the offending line is the one listed above. The error message indicates that it doesn't recognise the <font color=red>replace</font color=red> function.

    Now as far as I can work out, this function is part of the VBE6.dll library file - the default VBA reference on all four machines. I have checked in the object browser on the "faulty" machine and it finds the <font color=red>replace</font color=red> function and lists it's arguments, etc, so as far as I can tell the function is available to that installation. I checked the .dll version numbers on all the machines and they are all the same.

    The worst part is that this error did not occur on that machine two days ago, but suddenly started yesterday. I can't think what could have changed to cause this error to occur now.

    Any ideas please,

    Thanks,

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

    Re: Unrecognised function (A2K-SR1)

    Hello Adrian,

    You've probably checked this already, but to be on the safe side:

    Open the database on one of the "faulty" machines. Open any module. Then select Tools/References...

    If there is any reference saying MISSING, this can cause Access to stop recognizing functions in other libraries. Uncheck any MISSING reference.

    You can also try to decompile, compile and compact the database, preferably on one of these machines. (If you don't know what "decompile" means, do a search on this Forum.)

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Location
    Johannesburg, Gauteng, South Africa
    Posts
    104
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Unrecognised function (A2K-SR1)

    Thanks - I have checked the references. I have made sure that there are only three checked on each machine - VBA, Access 9 Obj Lib and DAO 3.6. More specifically, VBE6.DLL, MSACC9.OLB and DAO360.DLL.

    If I recall correctly, if any references were "missing", they would be listed near the top of the list. Is that correct ?

    I will try decompiling it, etc - I already copied those instructions from one of Charlotte's posts a while back.

    Let's hope this helps,

    Thanks,

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

    Re: Unrecognised function (A2K-SR1)

    Hello Adrian,

    Yes, any "missing" references would be immediately below the standard references you mention.
    Access lists the standard references first, then any other references that have been set (checked), then all other references (unchecked). A "missing" reference is always checked - otherwise Access wouldn't have found out it is missing.

    Regards,
    Hans

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Unrecognised function (A2K-SR1)

    Adrian -
    Another possibility is that someone has installed some new software on that PC and you now have a different version than Access is expecting. Office 2002 is famous for doing that to people, although I've heard reports that Visio 2002 also does it, and perhaps other individual Office 2002 apps. You might do a search on VBE6.DLL and see if there are any threads that mention it. Good luck - these kinds of problems can be sticky.
    Wendell

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

    Re: Unrecognised function (A2K-SR1)

    All the 2002 apps from Microsoft that support VBA as a programming language (I assume all of them do, but I'm hedging my bets <img src=/S/grin.gif border=0 alt=grin width=15 height=15>) install the VBE6.DLL. I don't know whether it would cause this problem, but has certainly caused others that I know of, so it's worth considering.
    Charlotte

  7. #7
    2 Star Lounger
    Join Date
    May 2002
    Location
    Johannesburg, Gauteng, South Africa
    Posts
    104
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Unrecognised function (A2K-SR1)

    Thanks Hans, Wendell and Charlotte for your suggestions.

    Just as the problem appeared, it has mysteriously disappeared, so I guess I will never know what the cause of the problem was. <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

    We don't have Win or Office XP on site, so it wasn't that. Nobody had installed any new software (or in any case was owning up to having done so!).

    There were no missing references, the correct object libraries were installed and the version numbers of the respective .dll's and .olb were identical to the other machines which didn't have the same problem. I hope the problem doesn't reappear otherwise I am back to square one.

    regards,

Posting Permissions

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