Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Access 2010 crashing - help

Posted on 2011-10-07
9
Medium Priority
?
320 Views
Last Modified: 2012-05-12
I have a front end file in Access 2010, with a separate data back-end. They have been working fine together.
I made a change to a single line of code (adding one more field to a sql string - setting the datasource for a continuous subform in a procedure) - and nothing else... the program crashes when i try to run it OR when I simply try to open up the Visual Basic code. It did this several times. This code isn't even in the form that is loading when the program loads.
I do not get a specific program error, but the generic "Microsoft Access has stopped running" and it hangs...
Before making the change, I have compacted and repaired both front and back-end.
Any ideas???
0
Comment
Question by:terpsichore
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1000 total points
ID: 36933817
A **DeCompile** may help here ...

But first, if you have not already:
Open the VBA Editor and from the menu ...Tools>>References ....
If you see any listed as **Missing: <reference name>, including the asterisks and the word Missing, the
you need to fix that first.

Then, follow this procedure:

****
0) **Backup your MDB BEFORE running this procedure**
****
1) Compact and Repair the MDB, as follows:
Hold down the Shift key and open the MDB, then from the menu >>Tools>>Database Utilities>>Compact and Repair ...
Close the mdb after the Compact & Repair.
2) Execute the Decompile (See example syntax below) >> after which, your database will reopen.
3) Close the mdb
4) Open the mdb and do a Compact and Repair (#1 above).
5) Close the mdb.
6) Open the mdb:
    a) Right click over a 'blank' area of the database window (container) and select Visual Basic Editor. A new window will open with the title 'Microsoft Visual Basic' ... followed by then name of your MDB.
    b) From the VBA Editor Menu at the top of the window:
       >>Debug>>Compile
        Note ... after the word Compile ...you will see the name of your 'Project' - just an fyi.

7) Close the mdb
8) Compact and Repair one more time.

*** Executing the DeCompile **EXAMPLE**:
Here is an **example** of the command line syntax  (be SURE to adjust your path and file name accordingly) before executing the decompile:

Run this from Start>>Run, enter the following command line - **all on one line** - it may appear like two lines here in the post:
Also, the double quotes are required.

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\YourMdbNameHERE.mdb"

For more detail on the Decompile subject ... visit the Master on the subject (and other great stuff) Michael Kaplan:

http://www.trigeminal.com/usenet/usenet004.asp?1033

AND ...
Once you get familiar with the Decompile idea (and ALWAYS make a BACKUP first!) ... you can add both Decompile and Compact/Repair to the Right Click menus in Windows Explorer, which I use multiple times daily:

Getting the Decompile and Compact context menu options
http://access.mvps.org/access/modules/mdl0039.htm

mx
0
 

Author Comment

by:terpsichore
ID: 36934099
i will try that (may be over the weekend) and get back to you - thank you so much in advance, i will report back
0
 
LVL 40

Expert Comment

by:als315
ID: 36934885
Reference to menu options in:
http://access.mvps.org/access/modules/mdl0039.htm
is broken.
You can use this registry patch (for Access 2010):
 
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.accdb]
@="Access.Application.14"
"Content Type"="application/msaccess"

[HKEY_CLASSES_ROOT\.mdb]
"Content Type"="application/x-msaccess"
@="Access.Application.14"
[HKEY_CLASSES_ROOT\Access.Application.14]
@="Microsoft Access Database"

[HKEY_CLASSES_ROOT\Access.Application.14\Shell\Decompile\command]
@="C:\\Program Files\\Microsoft Office\\Office14\\MSAccess.exe \"%1\" /DECOMPILE"

[HKEY_CLASSES_ROOT\Access.Application.14\Shell\Compact\command]
@="C:\\Program Files\\Microsoft Office\\Office14\\MSAccess.exe \"%1\" /COMPACT"

Open in new window

(correct path to MsAccess.exe, save this text as reg and run)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1000 total points
ID: 36935490
Also, once you do the decompile option you should then Compile your VBA Code. To do that, open the VBA Editor and click Debug - Compile. Fix any code errors and continue doing this until that menu option is disabled.

If the fixes suggested by mx work I'd also further encourage you to build a new, blank database and import everything into that new database. While decompile will work for your objects, there's also the possibility that you have container corruption and decompile won't fix that.

I would say you could also try the SaveAsText/LoadFromText methods, but since you can't open the VBA Editor at this point it wouldn't do much good :)

If the fixes don't work, then your only option would be to either (a) restore from a recent backup or (b) send the db to a recovery specialist like www.everythingaccess.com.
0
 
LVL 9
ID: 36935888
Did you install SP1?  Many problems have been reported with VBA instability after SP1 is installed.  You may want to try uninstalling it.

Apparently there is a fix scheduled this month:
http://answers.microsoft.com/en-us/office/forum/office_2010-access/access-2010-sp1-you-receive-random-crashes-in/d2bf6175-075a-4a12-a2b1-f55d40af271b
0
 
LVL 75
ID: 36936462
"Reference to menu options in:
http://access.mvps.org/access/modules/mdl0039.htm
is broken."

Works for me right now (10-8-2011 10:25 pdt).  MVPS.org has been up/down lately ... not sure what's up.

"LSMConsulting:
Also, once you do the decompile option you should then Compile your VBA Code. To do that, open the VBA Editor and click Debug - Compile. Fix any code errors and continue doing this until that menu option is disabled."

That's included in the procedure I posted.

mx
0
 
LVL 85
ID: 36938425
<That's included in the procedure I posted.>

Sorry ... didn't see it in there.
0
 

Author Comment

by:terpsichore
ID: 36957457
Thanks to everyone; I'm still diagnosing this.
0
 

Author Closing Comment

by:terpsichore
ID: 36958985
I would like to have awarded more people - I was amazed by the smart and thoughtful responses. In the end, I upgraded my already reasonably current software, including BIOS, and the problem disappeared. I also learned an incredible amount from these posts. Thank you to all.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question