Link to home
Start Free TrialLog in
Avatar of bfuchs
bfuchsFlag for United States of America

asked on

Ms Access shutting down suddenly!

Hi Experts,
One user is complaining that since got a new pc, sometimes Access shuts down suddenly, see attached..
What can be the reason?
Thanks
Capture.PNG
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Probably it has a bad reference or its using a reference that is slightly different than the one others are using.
Open the application mode and compile it (Alt+F11 -->Debug -->Compile yourApplicationName)
If errors popup then fix them and check again
If no errors popup then check very thorougly your references ....even they named the same and they look the same you need to go to check the underlying  .dll/ocx for exact version number...check this problematic PC against a good working one...
Also does this machines encounters other problems...(maybe a test of memory with MemTest+ ) would be a good idea.
On the PC in question, go to the event viewer, which will show you the error and where it occurred.

 It can be any number of things causing this, including a bug in Access itself that your tripping over.  So make sure you are up to date on updates.

Jim.
Avatar of bfuchs

ASKER

Hi Experts,
I first had told user last night to contact IT and request re-installing of Office, since this is happening to one user only, I guessed nothing wrong with the app..
Will keep an eye on it & let you know if problem occurs again.
Thanks,
Ben
Avatar of bfuchs

ASKER

Hi Experts,

Re-installing office didnt fix the issue.

Open the application mode and compile it (Alt+F11 -->Debug -->Compile yourApplicationName)
If errors popup then fix them and check again
Guess this is the case here, see attached on that pc.
However I dont know how to go about fixing it,
1- which reference is it missing? It has already MS XML, tried adding MSHTML and didnt work.
2- Besides, cant just add new reference because one pc has an issue..

Thanks,
Ben
Untitled.png
Avatar of bfuchs

ASKER

On the PC in question, go to the event viewer, which will show you the error and where it occurred.
This is what it shows there in one instance, anything of help?
Log Name:      Application
Source:        Application Hang
Date:          5/4/2018 12:43:27 PM
Event ID:      1002
Task Category: (101)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      DESKTOP-JL1J2UH.WG.Local
Description:
The program MSACCESS.EXE version 12.0.4518.1014 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Security and Maintenance control panel.
Process ID: 3eb0
Start Time: 01d3e3b3431d0cd8
Termination Time: 31
Application Path: C:\Program Files (x86)\Microsoft Office\Office12\MSACCESS.EXE
Report Id: 20f1c750-1a29-4477-8e79-e9b92b7877bf
Faulting package full name: 
 Faulting package-relative application ID: 

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Hang" />
    <EventID Qualifiers="0">1002</EventID>
    <Level>2</Level>
    <Task>101</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2018-05-04T16:43:27.659685600Z" />
    <EventRecordID>12707</EventRecordID>
    <Channel>Application</Channel>
    <Computer>DESKTOP-JL1J2UH.WG.Local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>MSACCESS.EXE</Data>
    <Data>12.0.4518.1014</Data>
    <Data>3eb0</Data>
    <Data>01d3e3b3431d0cd8</Data>
    <Data>31</Data>
    <Data>C:\Program Files (x86)\Microsoft Office\Office12\MSACCESS.EXE</Data>
    <Data>20f1c750-1a29-4477-8e79-e9b92b7877bf</Data>
    <Data>
    </Data>
    <Data>
    </Data>
    <Binary>430072006F00730073002D0074006800720065006100640000000000</Binary>
  </EventData>
</Event>

Open in new window

Thanks,
Ben
Avatar of bfuchs

ASKER

go to Add-ins tab.  At the bottom of the screen there is a drop down labelled "Manage" and along side it, a button labeled "Go ...".
User has MS Access verion 2010.
I dont see GO option listed under manage.
Anyways what does that supposed to show me?

Thanks,
Ben
Ben,

<<1- which reference is it missing? It has already MS XML, tried adding MSHTML and didnt work.>>

  You need a reference to the  Microsoft XML 5.0 lib for that dim to work.


<<2- Besides, cant just add new reference because one pc has an issue..>>

  Chances are you have this reference already, but it's broken on this one PC.   That lib is part of the Office install for 2003-2007.

  To figure out what's going on, I would go to a PC that is working and try to compile the app.   If the reference is missing, then add it (and you do need to add it).

  You need to get the code to a point where it does compile, then re-test on this PC.    If it still hangs, then something else is going on.

 But first and foremost, you want a clean compile and that's not just for this problem PC, but for everyone that uses the DB.

Jim.
Avatar of bfuchs

ASKER

Hi Jim,

I'm not in the office to get to test that pc in question.
You need a reference to the  Microsoft XML 5.0 lib for that dim to work.
It had a reference to Microsoft XML 6.0, dont think that's preventing the dim from working.
 Chances are you have this reference already, but it's broken on this one PC.   That lib is part of the Office install for 2003-2007.
I beleive it has Office 2010 installed, and as mentioned we already tried re-installing and didnt help, what do you suggest in order to fix that broken reference?
But first and foremost, you want a clean compile and that's not just for this problem PC, but for everyone that uses the DB.
I'm able to compile using A2003, and this is what I use for releasing, so far from all users (mostly using A2010), this is the only one experiencing this issue.

FYI- This is an ADP project and A2003 is the latest version that can modify it, and A2010 is the latest version that can use it, this is why we have this setup...

How do I proceed with it?

Thanks,
Ben
It had a reference to Microsoft XML 6.0, dont think that's preventing the dim from working.

 I would use the xml 5.0 reference and see if it breaks on the problem machine.

 You always want oldest references to be used.    Things can sometimes be brought forward by a later version (depends on the reference), but it can never take things backwards.

 I have a feeling though you won't find this is the problem....any pattern to when the app hangs?

Jim.
Avatar of bfuchs

ASKER

I would use the xml 5.0 reference and see if it breaks on the problem machine.
Its the other way around, just tested in my pc, replaced reference of MS XML 6.0 with 5.0 and is breaking at
 
Dim Request As New XMLHTTP60

Open in new window

....any pattern to when the app hangs?
Sent user email asking this, however doubt they will have answer to this.
BTW, In my experience, whenever there was a missing reference, the entire application failed to work, strange that this should just cause occasional crash.

Regardless what it is, I believe the fix should rater be at the particular pc than at the application, no?

Thanks,
Ben
Dim Request As New XMLHTTP60

 That's because the XMLHTTP60 object doesn't exist in xml 5.0.   When your in VBA, set a reference to both libs and use the object browser on each.   For xml 5.0, you'll see the object name is XMLHTTP.    Why Microsoft changed it for version 6.0 I don't know.

BTW, In my experience, whenever there was a missing reference, the entire application failed to work, strange that this should just cause occasional crash.

 That is typical, but it depends on the reference and the order they are listed in.   Sometimes you will have the situation where it only breaks when you use code pertaining to it.

<<Regardless what it is, I believe the fix should rater be at the particular pc than at the application, no?>>

   yes and no and this is the problem with early binding.   When you dim as something specific, it absolutely needs to be installed.  Problem is in this case is that the lib installed with Office varies.   So the app works on some stations the way it is written, but not on others.   If you change it to correct that, then it works where it failed, but now might not work where it once did.

   So it's really not a matter of "fixing" a station, but rather a problem with coding and/or install of the app.

  You have a couple choices:

1. Correct the install of the app by always installing the .DLL along with the app.

2. Use late binding.   With this, you don't declare the object as something specific, but rather  do it "as object".

#2 is usually the ticket when it comes to references, but in this case I'm not sure it's going to help as the object name changed between versions.  In other to do the correct call, you'd need to determine the installed version.

  So #1 is probably the route you want to go.

 The other option is to find another way of doing what you want to do that doesn't rely on the .DLL, but that is not always impossible.

 Welcome to the wonderful world of references and the fact that Access doesn't run as a standalone EXE :(

Jim.
Avatar of bfuchs

ASKER

Hi Jim,
So it's really not a matter of "fixing" a station, but rather a problem with coding and/or install of the app.
The reason I prefer not to change code here is that, this is not a situation where one out of 4 pc's is having a prob, as dozens of pc's with same setup are working, and therefore would not make sense to change something and have to test if not affecting elsewhere..
. Correct the install of the app by always installing the .DLL along with the app.
As mentioned we already tried re-installing office, what else do you suggest we do in order to fix this? how can I fix just a particular DLL?
Thanks,
Ben
<<how can I fix just a particular DLL?>>

1.  You need to take a copy of that .DLL and place it on the station in the same location as it is on a station that is working.

2. You will probably need to register it using regsrv32.exe:

https://support.microsoft.com/en-us/help/249873/how-to-use-the-regsvr32-tool-and-troubleshoot-regsvr32-error-messages

  after that, you should be able to set a reference and still have the app compile on that station.

 Jim.
Avatar of bfuchs

ASKER

Hi Jim,

The pc in question was offline today..
However I'm planning to take a copy of the program and remove all the code associated with that broken reference, compile it, save it as ADE and have the user test it, will see if that fixes the issue then we know this is the cause of it, and will try the above, otherwise we have to start looking at a different direction..

Thanks,
Ben
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.