473,614 Members | 2,351 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compile error causes MDE creation to fail in A97???

MLH
A97 aborts creation of MDE reporting that there's a compile
error in one form. Sure enough, if I remove the form from the
source database and attempt to compile the MDE, it succeeds.

But when I open the source MDB file and the form's class
module, click Debug, Compile Loaded Modules - no compile
time error is reported. What is the MDE doing to find a compile
time error that Debug/Compile Loaded Modules is not?

If you've encountered and overcame this obstacle in the past,
what did you determine to be the culprit?
Nov 25 '05 #1
5 2109
Try a decompile.

Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\m saccess.exe" /decompile
"c:\MyPath\MyDa tabase.mdb"
Then compact the database:
Tools | Database Utilities | Compact

If that does not solve the problem, copy the code from the form's module
out to a text file and save it. Then set the form's HasModule property to
No, so it loses the code. Compact the database. Then export the form itself
to a text file with this undocumented command:
SaveAsText acForm, "Form1", "C:\Form1.t xt"
Delete the form. Compact again.
Then import the form with:
LoadFromText acForm, "Form1", "C:\Form1.t xt"
The paste in the code, and try a Compile All.

If it's still stuck after this, is there any code in the form that alters
its RecordSource or writes the SQL of its source query? If so, or you have
any code that refers to a field in the form's RecordSource that is not also
the name of a control on the form, try using a bang instead of a dot when
referring to that field in your code.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MLH" <CR**@NorthStat e.net> wrote in message
news:hu******** *************** *********@4ax.c om...
A97 aborts creation of MDE reporting that there's a compile
error in one form. Sure enough, if I remove the form from the
source database and attempt to compile the MDE, it succeeds.

But when I open the source MDB file and the form's class
module, click Debug, Compile Loaded Modules - no compile
time error is reported. What is the MDE doing to find a compile
time error that Debug/Compile Loaded Modules is not?

If you've encountered and overcame this obstacle in the past,
what did you determine to be the culprit?

Nov 26 '05 #2
MLH
Thank-you Allen. What I did was to go to an earlier
(previous) rev and use the copy of the form saved
there. I copied ALL the form's code from the later
rev into the earlier rev. Fortunately, none of the
form's controls had been modified, renamed nor
no new one's had been added. Afterward, the
make MDE process was flawless. TGBF.

I kept a copy of the database with the flawed
form and I will go back to it sometime and test
your suggestions. They seemed like good ones.

BTW, is /DECOMPILE commandline option one
of those where I should go RTMFHF as some
suggest here?
Nov 26 '05 #3
You can find many references to /decompile by a search on google.
--
Terry Kreft

"MLH" <CR**@NorthStat e.net> wrote in message
news:6b******** *************** *********@4ax.c om...
<SNIP>
BTW, is /DECOMPILE commandline option one
of those where I should go RTMFHF as some
suggest here?

Nov 26 '05 #4
Access keeps 2 copies of your code:
- the text you read and edit;
- the compiled code that runs.
If the 2 versions are out of sync, you have a corruption.

Decompiling discards the compiled version.
Access automatically recreates it.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MLH" <CR**@NorthStat e.net> wrote in message
news:6b******** *************** *********@4ax.c om...
Thank-you Allen. What I did was to go to an earlier
(previous) rev and use the copy of the form saved
there. I copied ALL the form's code from the later
rev into the earlier rev. Fortunately, none of the
form's controls had been modified, renamed nor
no new one's had been added. Afterward, the
make MDE process was flawless. TGBF.

I kept a copy of the database with the flawed
form and I will go back to it sometime and test
your suggestions. They seemed like good ones.

BTW, is /DECOMPILE commandline option one
of those where I should go RTMFHF as some
suggest here?

Nov 26 '05 #5
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in
news:43******** *************** @per-qv1-newsreader-01.iinet.net.au :
Access keeps 2 copies of your code:
- the text you read and edit;
- the compiled code that runs.
If the 2 versions are out of sync, you have a corruption.

Decompiling discards the compiled version.
Access automatically recreates it.


But you should control when it recreates it as much as possible.

This means that you should set your options so that COMPILE ON
DEMAND is turned OFF (it's on by default). You'd think this would
cause problems, but it won't. If you look at the help file on the
VBA options you'll find a discussion of how these work, and it
explains why turning off COMPILE ON DEMAND doesn't really stop
Access from compiling code when it needs to. What turning it off
*does* do is reduce the number of times code gets compiled.

I am in the habit of hitting compile and then SAVE frequently when
in the code window (this is especially important with A2K+, where
otherwise it's easy to lose code changes). I don't let Access do the
compiling, except when I forget to do it myself.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 26 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
277
by: Fiona McBride | last post by:
Hi all, I have a really odd problem with some Visual Basic .NET 2003 code; I have a program that creates a number of windows which contain RichTextBox, Timers (disabled) and menus. The code runs fine and creates the windows as required, BUT if the program is left to do nothing for several hours, when it is brought back into focus it generates an exception error (Object reference not set to instance of an object - this always coincides...
6
3324
by: Ben Ingram | last post by:
Hi all, I am writing a template matrix class in which the template parameters are the number of rows and number of columns. There are a number of reasons why this is an appropriate tradeoff for my particular application. One of the advantages is that the _compiler_ can force inner matrix dimensions used in multiplication to agree. A _complie-time_ error will be triggered if you write A * B and the number of coluns in A does not equal the...
1
2944
by: Amir | last post by:
Hi all, I have a table called PTRANS with few columns (see create script below). I have created a view on top that this table VwTransaction (See below) I can now run this query without a problem: select * from dbo.VwTransaction where
10
4446
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat Enterplise Linux 3 ES, and applied FixPack fp5_mi00069.tar to it. After creating an instance, starting the database, creating a database, and entering the table definitions, all of which seems to work OK, I entered a tiny 8-row table and can do...
3
2300
by: papaya | last post by:
hi all i download the gaim source code. http://gaim.sourceforge.net/ but i don't know how to compile it . i down the nsis-2.10.exe i load gaim-installer.nsi in nsis. env os windows 2k c++ compiler MinGWStudio nsis2.10
3
2138
by: BBC1009 | last post by:
Don't know why when rebuild VB.Net project (vb.net 2002 framework 1.0), this error comes out suddenly. Anyone can help. Thanks!!!!
10
3752
by: robert d via AccessMonster.com | last post by:
I have a global error handler that up until today has been working flawlessly. Let me first provide the relevant code **************************************************************** On Error GoTo Err_Ctrl 'This code is generating the error If Nz(Me.SubformCont.Form!txtUsage,"") = "' Then Msg "There's a problem"
14
2568
by: Urs Thuermann | last post by:
What is the most elegant way to check certain conditions at compile time? I.e. I want a compile time error to be generated if for example the size of a struct is not a multiple of 4 or if one struct is larger than another struct, etc. I think of something like #define CHECK(expr) static int dummy CHECK(sizeof(struct foo) % 4 == 0);
2
6915
by: Andrus | last post by:
I need compile in-memory assembly which references to other in-memory assembly. Compiling second assembly fails with error Line: 0 - Metadata file 'eed7li9m, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' could not be found Saving assembly to Windows temp directory for referencing only creates huge amout of temporary
0
8197
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8589
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8443
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7114
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6093
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5548
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4136
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1438
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.