UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Microsoft Access Has Stopped Working    
 
   
KRoth472
post Nov 3 2016, 06:44 AM
Post#1



Posts: 184
Joined: 12-August 10



Hello UA Admins and guru's,

I guess it has been sometime since I posted or logged on........but today I need some help.

I have one Command Button on a Form (PopUp = False) it has two lines of codes under the Click Event:

Me.Visible = False
DoCmd.OpenForm "Prod_1ToolsEquipment_Form", acNormal, , , acFormAdd, acWindowNormal

Simple enough right.....Well when it click the command button I get the nefarious, "Microsoft Access has stopped working" and the DB reopens not in Design Mode

So I have had this happen before and usually simply recreating the Command Button and filling the event with the same code does the trick. However i have gone as far to recreate the form in this case since it keeps happening.

This is the only Command Button with issues. All other navigation seems fine.

I've tried recreating command button on same form
I've tried recreating form
I've tried to decompile Access but the syntax in the articles i read did not work in CMD prompt
I've tried to repair and compress

This DB also has a lot of Global Variable in it and my machine was running low on memory at time of issue. I had just got debug error from module and i corrected it. After that the issue started and has not stopped

I am wondering if there is some .dll file I need to clean?

Thanks in advance for all the help as usual.
Go to the top of the page
 
ScottGem
post Nov 3 2016, 07:07 AM
Post#2


UtterAccess VIP / UA Clown
Posts: 32,051
Joined: 21-January 04
From: LI, NY


Try opening the form. The problem is probably not in the code behind the button, but something is wrong when the form opens.

--------------------
Scott <>
Scottgem's Blog
Microsoft Access MVP since 2007
Author: Microsoft Office Access 2007 VBA
Go to the top of the page
 
dmhzx
post Nov 3 2016, 07:35 AM
Post#3



Posts: 7,033
Joined: 22-December 10
From: England


Set up a decompile shortcut on your desktop.

navigate to Access, than add
/decompile
and save.
Use that to open access, and the next file you open from it will decompile
Go to the top of the page
 
KRoth472
post Nov 3 2016, 11:11 PM
Post#4



Posts: 184
Joined: 12-August 10



Hello dmhzx,

I must be missing something in the syntax....

C:\Program Files (x86)\Microsoft Office\Office15\MSACCESS.EXE / decompile

This file cannot be found but the navigation is correct it just won't let me use "/" symbol in the address.
Go to the top of the page
 
KRoth472
post Nov 3 2016, 11:14 PM
Post#5



Posts: 184
Joined: 12-August 10



Hi ScottGem,


The form will open fine when i launch from navigation pane. It is just when i click the command button and only for the underlying code in that command button.

The form where the command button is has three other command buttons that when they are clicked have the same code executes except the name of the form is changed in the DoCmd action.

Now when i copy the original target form and change the name of the target form it repeats again. Which i am thinking indicates there is something hung up in VBA that needs to be decompiled.

Not sure.
This post has been edited by KRoth472: Nov 3 2016, 11:19 PM
Go to the top of the page
 
ScottGem
post Nov 4 2016, 04:20 AM
Post#6


UtterAccess VIP / UA Clown
Posts: 32,051
Joined: 21-January 04
From: LI, NY


When you open the form from the Nav Pane are you opening in Add mode? If not, try removing the acFormAdd from the code and see what happens.

--------------------
Scott <>
Scottgem's Blog
Microsoft Access MVP since 2007
Author: Microsoft Office Access 2007 VBA
Go to the top of the page
 
dmhzx
post Nov 4 2016, 08:31 AM
Post#7



Posts: 7,033
Joined: 22-December 10
From: England


Take out the space
/ decompile
/decompile

Here is mine for Access 2010

"C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE" /decompile
This post has been edited by dmhzx: Nov 4 2016, 08:32 AM
Go to the top of the page
 
KRoth472
post Nov 10 2016, 03:47 AM
Post#8



Posts: 184
Joined: 12-August 10



Gents,

Thanks for the suggestions. In the query design i was using some of the global variables as criteria. For whatever reason the query design did not like my global variable. After i changed this it worked fine.

But very strange. Thanks for help.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    29th May 2017 - 08:16 AM