Access.exe 1 of 3 computers errors on Nz fuction

Steve_b

Registered User.
Local time
Today, 14:45
Joined
Sep 30, 2012
Messages
18
I have three computers, all running Windows 10 Pro, Office 2016, 32 bit. All three have the same Access library references checked. Two computers run the access database with no issues. The third errors on the opening form which uses the Nz function. Error is Nz not defined. When I disable the form, it errors on the next instance of Nz. How do I troubleshoot this? Thanks for some direction.
 
There is a problem with the references. VB goes looking for the function in your references but something is keeping it from getting to that point. It may be hanging on another library and not necessarily Access Object where NZ resides. I would uncheck your references and then recheck them all if you can.
 
if 1st suggestion doesn't help, I suggest you look at the Office and Windows versions between the pc's. Updates to Windows and Office have been known to introduce bugs that weren't in Access before the update. In Access, you can go File > Account > About Access to check on the build version for Access.
 
True that, Micron. And patches can be irregular, though not as much for Win10 as for earlier versions. Usually, if any Win10 discovers that a patch has been published, it wants it NOW if not yesterday.

In the past, we have seen this asymmetric behavior as the result of one machine having its copy of the front-end of the app get corrupted. There is also the chance that you missed something very specific. It is not enough to see that certain references are checked. You need to look at them to see if each one resolves to a valid place on the system and that the physical file name matches across the group of three computers. None of the checked references should say "Missing file" or some other problem like that.

A couple of quick-n-dirty possible fixes:

1. Do a compact & repair on the app file on the miscreant machine
2. Load up the Office disk that contains Access and start an installation. What SHOULD happen is that the Office disk will offer several options, one of which is "Repair." Use that option to repair the Access installation to assure that MSACCESS.EXE is not corrupt.
3. Create a new blank database and copy all elements from the failing DB to the new blank DB.

If none of those work, let us know.
 
Thanks for all the suggestions which I will try tonight. What is strange on the one computer is when I get that error then open the database and bypass that form, I opened up the form is design mode and executed the NZ function as written in the immediate window. It worked. I re-load the form and the error disappears. If I rewrite the same line of code and them compile in the impacted computer I don't have the problem. Again., thanks for the advice and I will get back with any news. I see no missing library indications.
 
Yep, that fact was useful, Steve. Letting us know you can run the function manually from an Immediate window is a crucial fact. I should have asked you to do that experiment earlier but I just didn't think of it at the time.
 

Users who are viewing this thread

Back
Top Bottom