Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

More informative compilation errors? 2

Status
Not open for further replies.

pullingteeth

Programmer
Sep 26, 2003
128
US
Hello, I'm using Access XP. When trying to compile an MDE and failing, it gives a really uninformative error message ("Could not make MDE file") with no option to see details. As I remember, Access 97 pinpointed at least the module or form which was giving problems; right now my "solution" is to remove all the forms & modules, and add them back in a few at a time until it fails to compile, to pinpoint the problem area.

So, how can I get XP to give me more information when it fails?
 
How about opening a code window and trying to compile the VBA code. If it compiles, then maybe your problem is elsewhere.

Is there enough space on the target disk to save the new 'mde' file.
If it is a network drive, perhpas you do not have 'Create File' rights to the directory.

Was the source mdb file created/protected with Access Security? Are you(Admin)the 'Owner' of the mdb file.

These are Just some things to Check.

Good Luck,
Hap...

Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Hi Hap, yes I worked it out through the method I described. However, is there a way to make the error message more descriptive, i.e. to pinpoint the form or module that is not compiling (i.e. to restore the behaviour that Access 97 had)? Because it really sucks to have to delete them all and then reimport them a few at a time to pinpoint the problem.

Thanks
 
Dear Pullingteeth,

Well, yes, I thought I described that to you.
1) Open a form, report or module file (in design view) that has VB Code.
2) From the Code tool bar at top, select 'Debug' > 'Compile Database'
3) Any Errors should show up and the problem code should be displayed.
4) Fix the code and compile again until you get a good clean compile.

Note: I also compact and Repair before compileing will help.

Hap..


Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
Hi Hap, we're talking at cross purposes, I guess. There are 100s of forms in this application, and it wouldn't make sense timewise to compile each individually every time we make a new MDE. Access97 used to give the form or module name that wasn't compiling, when it failed to make an MDE. So, I was just wondering whether there was a way to change XP's settings to do the same.

Thanks
 
Hi,

As far as I know, if you are compiling one form or report, the entire database gets compiled. So, If you compile the one form and it works, but if you try to make an mde and it fails, then I suspect that your database may be corrupt. Perhaps a deleted form or the like is lingering but not visible.

If that is the case, try creating a new blank database, import all objects and tables from the mdb in question, then try compiling and making an mde from this new mdb.

If this does not work, then I am confused, because it works here for me.

Hap...


Access Developer [pc] Access based Add-on Solutions
Access Consultants forum
 
OK, I finally gotcha. I assumed (incorrectly) that that would only compile one form. Thanks for your persistence! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top