473,804 Members | 2,140 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 1422

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

Similar topics

0
2044
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
6800
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
12747
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
2839
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
6938
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
6366
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
9715
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10603
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
10353
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
10099
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
9176
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
6869
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
5536
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3836
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.