473,796 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Determine Compile Status / Compile Target db using Vba

I need to open a Target db and determine if it is in a compiled state
and if not to Compile it.
The Application.isc ompiled status is showing the value for the host
mdb - not the Target (when in debug mode)
The Target db (ConversionCode .mdb) is being opened sucessfully and I
can display the Module names (one again in debug mode)
When I try DoCmd.OPenModul e (prior to compile attempt) I get error
2516 - Cannot Find the Module.

Is there a problem with the code or is there a better way of achieving
my aim

Regards
Robin

++++ COde Sample
Dim db As Database
Dim oAcc As Access.Applicat ion
Dim dbpath As String
dbpath = "c:\conversionc ode.mdb"
Set oAcc = New Access.Applicat ion
Set db = oAcc.DBEngine.O penDatabase(dbp ath)
oAcc.OpenCurren tDatabase dbpath
Set ctr = db.Containers!M odules
If ctr.Documents.C ount > 0 Then
DoCmd.OpenModul e ctr.Documents(0 ).Name
XXX FAILS HERE DoCmd.RunComman d
acCmdCompileAnd SaveAllModules
DoCmd.Close acModule, ctr.Documents(0 ).Name
Else
'No Modules present, try Forms container
Set ctr = db.Containers!F orms
'no need to check for count since this code itself must be
present
' *somewhere*
With ctr.Documents(0 )
DoCmd.OpenForm .Name, acDesign
DoCmd.RunComman d acCmdViewCode
DoCmd.RunComman d acCmdCompileAnd SaveAllModules
DoCmd.Close acForm, .Name
End With
End If
Nov 13 '05 #1
0 1421

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

Similar topics

0
2043
by: Adam McCarthy | last post by:
I'm trying to get a cross compiler working for arm-wince-pe. This is the output for the primes Pyrex example. If I compile simple Hello, World's etc, it works fine, but for some reason Python libraries/headers seem to produce this. I have libpython2.3.a in /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib/ and /usr/lib/python2.3/config. I've checked it using arm-wince-pe-objdump. I also extracted it with...
27
6799
by: Kevin A | last post by:
Hi, Is there a way to determine the name and version of the operating system in a portable way? (for Solaris/Linux) Thanks, Kevin
0
328
by: arnottclose | last post by:
I need to open a Target db and determine if it is in a compiled state and if not to Compile it. The Application.iscompiled status is showing the value for the host mdb - not the Target (when in debug mode) The Target db (ConversionCode.mdb) is being opened sucessfully and I can display the Module names (one again in debug mode) When I try DoCmd.OPenModule (prior to compile attempt) I get error 2516 - Cannot Find the Module. Is there a...
2
1576
by: Chris Carter | last post by:
We have a site, for reference I'll call this MainSite, that has certain pages actually hosted on another site, I'll call this ChildSite. In MainSite when you click on a certain link, it loads a page with an IFrame that points to a page in ChildSite. MainSite and ChildSite are on two different machines. If MainSite can "see" ChildSite, everything works like a champ. However, if there is a network problem, firewall issue, or something...
1
12746
by: 张沈鹏 | last post by:
How to compile the HelloWorld of boost.asio? Maybe this is a stupid problem , but I really don't konw how to find the right way. My compile environment is WinXP, Msys , MinGw , G++ 3.4.2, Boost 1.33.1,
12
6622
by: =?Utf-8?B?Um9nZXIgTWFydGlu?= | last post by:
I am writing a web app to be widely distributed where I do not know the installed .NET Framework version. I want to take advantage of some .NET 3.0 classes if they are installed, but gracefully degrade if not available. (Specifically, I want to use System.Windows.Media.Imaging.BitmapMetadata to extract metadata from JPEG files when 3.0 is available, but will resort to System.Drawing.Image if .NET 3.0 is not installed.) What is the...
5
2838
by: byron | last post by:
I've downloaded the 64bit gcc compiler since the mysql installed is the 64bit option but now I'm getting the following error #./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/ usr/local/mysql configure:60026: checking for mysql_errno in -lmysqlclient configure:60045: gcc -o conftest -I/usr/local/include -mgnu-ld - D_XOPEN_SOURCE_EXTENDED -L/usr/local/mysql/lib -L/usr/local/mysql/lib - L/usr/local/lib ...
19
6937
by: perry.yuan | last post by:
How could I determine the endianness of my compile environment at compile time, instead of run time? I need a macro ("some_expression"), i.e. #if some_expression #define TARGET_IS_LITTLE_ENDIAN #else #define TARGET_IS_BIG_ENDIAN No way or some way? TIA.
2
6364
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $ ../glibc-2.5/configure --prefix=/mnt/new/Mars/glibc_HQ_test/GLIBC/ install/ --with-__thread --enable-kernel=2.6.11 --enable-shared
0
9529
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10457
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...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10013
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
9054
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 projectplanning, coding, testing, and deploymentwithout 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...
0
6792
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
5576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4119
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.