473,396 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.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 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.Application
Dim dbpath As String
dbpath = "c:\conversioncode.mdb"
Set oAcc = New Access.Application
Set db = oAcc.DBEngine.OpenDatabase(dbpath)
oAcc.OpenCurrentDatabase dbpath
Set ctr = db.Containers!Modules
If ctr.Documents.Count > 0 Then
DoCmd.OpenModule ctr.Documents(0).Name
XXX FAILS HERE DoCmd.RunCommand
acCmdCompileAndSaveAllModules
DoCmd.Close acModule, ctr.Documents(0).Name
Else
'No Modules present, try Forms container
Set ctr = db.Containers!Forms
'no need to check for count since this code itself must be
present
' *somewhere*
With ctr.Documents(0)
DoCmd.OpenForm .Name, acDesign
DoCmd.RunCommand acCmdViewCode
DoCmd.RunCommand acCmdCompileAndSaveAllModules
DoCmd.Close acForm, .Name
End With
End If
Nov 13 '05 #1
0 1388

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

Similar topics

0
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...
27
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
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...
2
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...
1
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,...
12
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...
5
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=/...
19
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...
2
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 : $...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...

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.