Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Access re-launches on exit

Posted on 2013-01-17
21
Medium Priority
?
204 Views
Last Modified: 2013-02-05
My users had no problems when I had them opening the .ACCDE version of my application. However I was having DLL problems when publishing because we have a mixed environment of 32 and 64 bit pc's. So I decided to distribute the .ACCDB to everyone. This cured the publishing problem.

The problem I have now is that on some pc's, when the user clicks the cross to close the application, Access terminates back to the desktop, and then immediately relaunches dozens of times until the machine crashes. We see the taskbar filling up with all the instances which are being launched.  This issues seems to happen when the application has been open for an extended period. If it's only been open for a few minutes, then we dont see this issue when they close it.

It's difficult to troubleshoot this because all pc's except mine are using the runtime version of Access 2010. The problem never occurs on my development pc and never occured when they were runnning the .ACCDE

Has anyone seen a problem like this?
0
Comment
Question by:TownTalk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 8
  • 3
21 Comments
 
LVL 31

Expert Comment

by:gowflow
ID: 38786934
Are you sure that your .acdde code that you have terminate the session correctly ? Maybe you have an instruction there that is relaunching access when it is terminating. You should look at your code try put a trace and see where it goes from the moment you click on the X and forward see all the instructions it goes thru.

An other is it possible to exit your apllication by other means than the cross if yes does it do the same problem ?
0
 

Author Comment

by:TownTalk
ID: 38786954
When the user clicks on the cross, there is no code which executes, Access should simply close. I have not written any code to re-lanuch it.

There isn't currently another means of exiting the application, but I suppose I could put a button there, I would have to disable the cross though because that's what users are familiar with using.
0
 
LVL 31

Expert Comment

by:gowflow
ID: 38786980
well here you are !!! I don't know much access but I am sure there is application or a main envent like in forms there is UserForm1 (unload event)
You got to find out this event and you can test on your enviroment out a=1 in some of these events if you are not sure which and put F9 (stop) and run to see which event is called when you close and once you find which one then put the instruction END.
gowflow
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:TownTalk
ID: 38787045
No I have never implemented an unload event. I have done this in other applications, but not in this one. I checked my code and I can see nothing which should run when my application closes. Please remember that this issue only occurs on some pc's and never occured when we used the .accde file
0
 
LVL 31

Expert Comment

by:gowflow
ID: 38787052
ok what is the operating suystem of these pcs ? u got to find something in commun to these pcs
gowflow
0
 

Author Comment

by:TownTalk
ID: 38787063
We have XP and Win7 pcs. Two xp pcs and 1 Win7 pc have the problem. I've been developing in Access for 18 years and never saw anything like this.
0
 
LVL 31

Expert Comment

by:gowflow
ID: 38787106
ok you mentioned you had to install what on the user's pc ? I developp VB6 and VBA and use access as .mdb database but never developped an Access application as when u developp VB access becomes useless. I think you hv maybe a dll corrupt u mentioned you had dll problems so maybe here is the issue.

So let me summarize what is it what you downloaded on the user machine a file dll or many or .. ?
gowflow
0
 
LVL 58
ID: 38787114
Access 2010 has shown some flakeyness (and yeah, I guess that's the technical term<g>), especially with regards to the runtime.

A lot of apps that worked in the past don't work in some areas as Microsoft tightened up a lot of syntax checking and data typing.

I would start with the basics:

1. Make sure it compiles without error.

2. Do a /Decompile or create a fresh copy of the DB.

3. Make sure your closing any object you open in code and setting it to nothing when done with it.

4. Make sure all stations are on the same rev (A2010 SP1).

 Last, when I have a problem, I always ask the question "What's changed recently?"  Prior to the DLL changes everything was working fine?  Then I'd look to that area.  What did you do to make it work in both 32 and 64 bit environments?  etc.

  Also check the compact on close option and if on, turn it off.

Jim.
0
 

Author Comment

by:TownTalk
ID: 38787162
The DLL problems are well known. When you develop on 64bit, you often cannot publish a .ACCDE to run on 32bit machines. There are compatibility problems. So I decided not to publish and just distribute a copy of my  original .accdb file. If you develop on 32 bit and publish to 32 bit machines, these problems do not occur. The same with 64 bit.

Each client pc has the runtime version of Access installed, this allows databases to be opened, but does not allow objects to be designed. Previously I published a .ACCDE file which only contains compiled objects, but none of my actual code. Now they are getting a full copy of my .ACCDB file which contains everything.

Dont know why you say VB Access is useless. I think it's amazing. I use nothing else. I tried VB, but for pure database applications Access puts everything there where you can use it easily.
0
 
LVL 31

Expert Comment

by:gowflow
ID: 38787288
sorry for the word 'useless' I must say 'useless to me' instead as when you program VB6 full extend and use API's and all features of VB6 to ADO and all then u feel somewhow limited with Access I am talking on professional level my application are used by the company on all levels no need to give them my code all they get is an .exe but this is beside the point was just to clarify my comment (was a personal talk to myself) an no meant any harm sorry if you felt offended, I know we take our work at heart and personal sometimes especially in your case when u say u developped for over 18 years ....

Sorry again
gowflow
0
 

Author Comment

by:TownTalk
ID: 38787305
Access doesn't give you a .exe, but when you publish a .ACCDE all your source code has been removed and only the executable machine code is still in there. You can also set permissions so that only yourself can design objects.
0
 
LVL 31

Expert Comment

by:gowflow
ID: 38787324
nice. But sure it does not solve your issue. I guess you need to go by the basics but you did not answer my question. What did u install on user's pc so they run your app ? the full Access and you are distributing the whole code ??
gowflow
0
 

Author Comment

by:TownTalk
ID: 38787356
Actually yes I did answer your question. Four messages higher up this thread....

"Each client pc has the runtime version of Access installed, this allows databases to be opened, but does not allow objects to be designed. Previously I published a .ACCDE file which only contains compiled objects, but none of my actual code. Now they are getting a full copy of my .ACCDB file which contains everything"

Yes I am distributing the whole code, but it is useless to anyone outside this company.

I just saw that Jim Detman replied a while ago. I didn't see that at first.
0
 
LVL 31

Expert Comment

by:gowflow
ID: 38787385
I thought you had seen his reply and did what he asked.
gowflow
0
 

Author Comment

by:TownTalk
ID: 38787517
Jim,

>> Access 2010 has shown some flakeyness (and yeah, I guess that's the technical
>> term<g>), especially with regards to the runtime.

Actually the runtime was working fine. It's the .ACCDB which has the problem.

>>  Do a /Decompile or create a fresh copy of the DB.

I've done the /decompile recently

>> Make sure your closing any object you open in code and setting
>> it to nothing when done with it.

Actually I just spotted that the SQL Server connection is open. I will make it close that. I wont be able to say immediately if it's fixed though. This issue only occurs if the application has been open for a few hours.

>> 4. Make sure all stations are on the same rev (A2010 SP1).

Yes every station including my own is on v 14.0.6024.1000

>> Last, when I have a problem, I always ask the question "What's changed recently?"
 >> Prior to the DLL changes everything was working fine?  Then I'd look to that area.
 >> What did you do to make it work in both 32 and 64 bit environments?  etc.

Well until a few months ago I  was developing on an old 32 bit pc which published .ACCDE files which were always happy in both the 32 and 64 bit environments. I was given a nice new 64 bit Acer laptop and we found that the .ACCDE files it produced did not work on the 32bit machines. So this is when I started distributing a copy of the .ACCDB file and the trouble started.

>> Also check the compact on close option and if on, turn it off.

No, I never use that.
0
 
LVL 58
ID: 38787695
<< I was given a nice new 64 bit Acer laptop and we found that the .ACCDE files it produced did not work on the 32bit machines. So this is when I started distributing a copy of the .ACCDB file and the trouble started. >>

 Did that happen to have Windows 7 SP1 installed on it?

Jim.
0
 

Author Comment

by:TownTalk
ID: 38787710
Yes it does! Is that relevent?

Ian
0
 
LVL 31

Expert Comment

by:gowflow
ID: 38788123
Try running on culprit machine with compatibility mode choosing lower than 64bits.
I hv all the trouble in the world with 64bits machine !!! developpment whyse best environment is 32bits sofar
gowflow
0
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 38788789
<<Yes it does! Is that relevent?>>

  There were some issues with DB's compiled and then executed on down-level systems.  Primarly it involved ADO (it was totally broken), but there may have been other things mixed in with that.

Take a look at this:

An ADO-based application that is compiled in Windows 7 SP1 or in Windows Server 2008 R2 SP1 does not run in earlier versions of Windows
http://support.microsoft.com/kb/2640696

  If you are using ADO, then I would install the update and re-compile and see if that clears up the issue.

  Make sure that Windows and Office are up to date as well.

Jim.
0
 

Author Comment

by:TownTalk
ID: 38792237
Actually i'm out of the office for 2 weeks now. So i'll thank you for your help so far and pick this up when I get back.

Ian
0
 

Author Comment

by:TownTalk
ID: 38854546
Hi sorry about the delay.

Yes Windows is up to date. Access is the only Office product we use on the problem machines and that is up to date.

Installing that update has fixed the issue. So thank you for your help. Much appreciated.

Ian
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

610 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