What am I doing wrong, it seems so easy.

  • Thread starter Thread starter WinstonSlagg
  • Start date Start date
W

WinstonSlagg

Guest
These are from a post that I used to help me get things going. I had almost the same exact problem as the guy with the "Undefined Function Error".

********************
********************

Undefined Function Error
I'm stumped. Anyone have clue?

All my reports that contain Access string functions like =Left([Lastname],1) are no longer identifed by Access. They worked at one time, but I have done so much coding I don't know when they stopped working.

I tried to create a new report with the same function, but get the same "Undefined Function" error.

I also created another database with the same function to see if Access was corrupt, but it worked fine.

Any thoughts?

Thanks



12-04-2001 12:43 AM


R. Hicks
Senior Member

Registered: Dec 1999
Location: Birmingham, Alabama, USA
Posts: 788
This is usually caused by a "Missing" library reference.

Open any module in design view, select Tools/References in the VBA Window if Access 2000/2002 or Tools/References in Access Main Menu if Access 97. Check the list of library references for "Missing" attached to a checked reference. If you locate one and the reference is not needed in the app, simply uncheck the offending reference and your problem should be cleared up. If the missing reference is needed in the application then you will need to install and properly register the needed files associated with the library on the offending machine.
If this problem is in Access 2000/2002 and you are using DAO references in your code, you may need to enable (place a check in box) Microsoft DAO 3.6 library. This can cause the problem you describe also.

HTH
RDH

********************
********************


Now, I did what was suggested, and found that the Microsoft DAO 3.6 library was the culpret on this machine. I found it, checked the box next to it, and all is well on THIS machine. Problem is... I am on a network. Now, I still get the same error message on EVERY machine I go to, EXCEPT my machine. I was wondering if I have done something incorrectly, or have I missed something. I did not find anything in the list of library references as "Missing" attached to a checked reference.

Please help me, if you can. Like I said, I am on a network (at work), and the Form / Query that this is having problems with, is one that SEVERAL people access (including our recieving department). We are basically dead in the water without having this thing work properly.

What makes me UPSET is that, the thing was working one day, then is broken. I find information from you guys to help resolve it and get it working, only, NOW it ONLY works on my machine. What is up with that ?!?!?

Thank you in advance
WinstonSlagg
 
References break for various reasons. I would guess in your case since the problem is system wide, that some application was installed or upgraded on everyone's PC and that application replaced some .dll that Access shares with a newer version.

When you add ActiveX controls or use code that requires library support such as DAO, ADO, or OLE, Access stores the location and version information of the referenced libraries. If something in your enviornment changes or you copy the Access db to a new environment, the location or version of these referenced .dll files may be different. These "broken" references cause Access to fail whenever it attempts to process a function. The thing that fools most people is that the function that actually fails normally has nothing to do with which library is actually missing. The failing function is most often one of the integral Access functions such as Date().

Since you have fixed your copy, you can try re-distributing your copy to the other users. As long as the location and version of the needed libraries is consistant throughout your network, that would be the easiest fix for now. Otherwise, you'll have to visit each PC personally and "fix" the problem. There is a way to do this fix via VBA and I thought I had stored a link to an article in the knowledge base that explained how to "fix" broken references with code but I can't find it. I did find the following article which might help you at least understand the problem.

ACC2000: How to Resolve Reference Issues in an Access Database (Q310803)
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q310803
 
I'm going to add to what Pat said.

A reference breaks because you replace a .DLL or some other file. Or because the registry entry for that file gets updated by another installation that somehow involves a shared library used by Access and whatever it was that got installed.

The bugaboo is that even if your database file is shared, your registry files aren't. The references involve entries in the registry. That is why this problem is fixed on your machine but not on other machines. EACH REGISTRY has to be updated. When you followed the instructions in the article you quoted, you fixed your local machine only.

There are ways to do this in an automated fashion but they are not for the squeamish. It involves writing VBA code to muck about in the registry, which is never something to do if you are not supremely confident, methodical, and slightly off-center. (The latter for even THINKING about mucking about in the registry.)

Hope that explanation puts it into a better perspective for you.
 
Most excellent advice... going to each machine (15 of them), was not as bad as I had thought it to be. Seems as though your speculations were correct, someone had installed a new activeX control (or atleast tried), and seeing as how I was able to fix my terminal, I guess that I assumed that it would globally fix the others. Live and learn.

Once again, thank you for the VERY helpful insight.

I just wish other forums and message boards would take note of the courtesy that you guys ooze of here. :)
 
And, I just deleted my other post with the same question... sorry for my double posting. I was not sure where it would be most easily answered. My mistake, and it will not happen again.
 

Users who are viewing this thread

Back
Top Bottom