Compiling into ACCDE causes all functioning to stop (1 Viewer)

msowards

Registered User.
Local time
Today, 05:34
Joined
Feb 16, 2012
Messages
21
I have the strangest problem. I've been working on this app for a while now and every now and again MS access will cause a corruption that requires me to remove all the modules from the startup form save the form and them paste them back in. I usually do a Cntrl 'A' and then a Cntrl 'X' and paste them into a blank note pad window. The corruption stops the Startup form from doing anything when it opens and does not process any of it's events (i.e. On Load, Open , Close). This usually happens while I'm running and working in the .accdb format. But now this has changed. Every thing works fine in the .accdb format, but when I complie into an .accde format the non responsive forms problem returns. And it's all the forms; none of them will execute any modules. I've tried my usual cutting and replacing code, I've even started a whole new database imported all the parts and test it and it worked, but as soon as I compiled it, the compile version does the same non functioning forms thing. Now I do have other .accde apps that are still working so I don't think it is access its self. Any other Ideas. I'm running Office 2007 ultimate (64 bit) on windows 7 .
 

mdlueck

Sr. Application Developer
Local time
Today, 08:34
Joined
Jun 23, 2011
Messages
2,631

boblarson

Smeghead
Local time
Today, 05:34
Joined
Jan 12, 2001
Messages
32,059
1. You are using 64 bit office which really shouldn't be used unless you have large spreadsheets in Excel which require lots of number crunching. Even the Access team at Microsoft has said that.

2. Are you trying to execute the ACCDE file from the same folder as the ACCDB file? The reason I ask is that, if you are not, then is that new location set as a trusted location?

3. Certain code in 64 bit office (mainly Windows API's) need to have ptrSafe added to the declaration.
 

msowards

Registered User.
Local time
Today, 05:34
Joined
Feb 16, 2012
Messages
21
Re: Dompiling into ACCDE causes all functioning to stop

I have two suggestions you may perform on a backup copy of your database:

VBA to Cleanup A2007 DB Extra Objects


NT Command Script and Documented Steps to Decompile / Compact / Compile an Access DB


Hey Thanks...
I'm not using ADO and I do perform compact and repair b3fore I do a compile. Actually I have found the problem and I'll write it up in a full reply..
 

msowards

Registered User.
Local time
Today, 05:34
Joined
Feb 16, 2012
Messages
21
1. You are using 64 bit office which really shouldn't be used unless you have large spreadsheets in Excel which require lots of number crunching. Even the Access team at Microsoft has said that.

2. Are you trying to execute the ACCDE file from the same folder as the ACCDB file? The reason I ask is that, if you are not, then is that new location set as a trusted location?

3. Certain code in 64 bit office (mainly Windows API's) need to have ptrSafe added to the declaration.

Well I started this project with what I had and don't have the mullah to buy another full office suite.

I am executing the ACCDE from the same directory, but I also have code that catches the Trusted location situation and with user OK adds the currentproject.path to a new Trusted location entry at startup.

Tell me more about the ptrSafe, please. How is it used and in what capacity?

On another note I have fixed my situation and I'll detail it below. In a full reply.
 

msowards

Registered User.
Local time
Today, 05:34
Joined
Feb 16, 2012
Messages
21
As I stated in my problem description... I have an App that syntactically works fine before it is compiled into a Accde file. Once compiled none of the forms modules work work.
As a common practice I always do a Debug compile before making the .accde file, but even that was not catching this problem.
What I found was one of the forms had extra long code lines some longer than 120 characters. Once I re-edited this form's module to remove extra space between the sub procedures all of a sudden Vb started complaining about these lines (they turned red and had extra quotes inserted into them). When I fixed them the debug compile now found more errors. These were line with string data with three quotes (i.e. " string data ""). They were supposed to be part of the previous line and where the extra quote came from I'm not sure, (actually the VB editor will add a quote at the end of a line if there are an odd number of quotes).
When I fixed these and made an new .accde file it worked.
Obviously this is some sort of VB editor problem or maybe, as Mr. Larson suggests it's the 64bit office Access editor???
 

boblarson

Smeghead
Local time
Today, 05:34
Joined
Jan 12, 2001
Messages
32,059
Thanks for posting back the solution. Sometimes being out on the fringes of the new stuff can be daunting because there hasn't been anyone out there before you to blaze the trail. So, I guess you are one of the trail blazers with regards to the 64 bit version of Office. Anything you learn could be helpful to others following behind. :)
 

Users who are viewing this thread

Top Bottom