Solved

Access re-launches on exit

Posted on 2013-01-17
21
180 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
  • 10
  • 8
  • 3
21 Comments
 
LVL 29

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 29

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
 

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 29

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 29

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 57
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 29

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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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 29

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 29

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 57
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 29

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 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now