PC Review


Reply
Thread Tools Rate Thread

Compiling all code?

 
 
=?Utf-8?B?Q2Vhc2FyaW5h?=
Guest
Posts: n/a
 
      11th Feb 2005
I´ve developed an application in Access 97. Some users have AutoCad and the
application have references to AutoCad and writes to dwg-files. Some other
users do not have AutoCad and therefore the application removes all broken
references at start. Used to work fine.
Then I converted to 2000. Suddenly the application wasn´t able to remove
broken references. Ok - I worked around the problem by doing the other way
around - the standard version didn´t have any references, but if the user was
somebody with AutoCad on the machine then references were created.
But now, when the user without AutoCad is trying some actions that has
worked before, Access is trying to compile ALL code (at least the code in a
module that has absolutely nothing to do with the event) and then generates a
compile-error because in that module I declare variables of AutoCads types.
Anybody have any explanation? Any ideas of how I can solve this?
Thank in advance!
 
Reply With Quote
 
 
 
 
Naresh Nichani MVP
Guest
Posts: n/a
 
      11th Feb 2005

"Ceasarina" <(E-Mail Removed)> wrote in message
news:5411F8CD-318A-471E-940A-(E-Mail Removed)...
> I´ve developed an application in Access 97. Some users have AutoCad and

the
> application have references to AutoCad and writes to dwg-files. Some other
> users do not have AutoCad and therefore the application removes all broken
> references at start. Used to work fine.
> Then I converted to 2000. Suddenly the application wasn´t able to remove
> broken references. Ok - I worked around the problem by doing the other way
> around - the standard version didn´t have any references, but if the user

was
> somebody with AutoCad on the machine then references were created.
> But now, when the user without AutoCad is trying some actions that has
> worked before, Access is trying to compile ALL code (at least the code in

a
> module that has absolutely nothing to do with the event) and then

generates a
> compile-error because in that module I declare variables of AutoCads

types.
> Anybody have any explanation? Any ideas of how I can solve this?
> Thank in advance!



 
Reply With Quote
 
Naresh Nichani MVP
Guest
Posts: n/a
 
      11th Feb 2005
Hi:

One way to solve problem is to goto use LateBinding to refer to the AutoCAD
Object Model and use the numbers instead of the Constants.

In Late Binging there is not explicit reference to AutoCAD Libarary - you
declare the ACadApplication, ACadDrawing etc. all as Objects. It is hard to
code but will work on all machines.

Dim ACadApp as Object
Set ACadApp = CreateObject(,"AutoCad.Applciation")

This would create instnace of AutoCAD

If you are using a Contstant get the vale of the constant and replace with
real number. You can get this by going to AutoCad and opening the Visual
Basic for Applications Editor and typing CTRL+G to get the Immediate Window.
Here type
?Constant and press Enter to get the number valid of constant.

Regards,

Naresh Nichani
Microsoft Access MVP




"Ceasarina" <(E-Mail Removed)> wrote in message
news:5411F8CD-318A-471E-940A-(E-Mail Removed)...
> I´ve developed an application in Access 97. Some users have AutoCad and

the
> application have references to AutoCad and writes to dwg-files. Some other
> users do not have AutoCad and therefore the application removes all broken
> references at start. Used to work fine.
> Then I converted to 2000. Suddenly the application wasn´t able to remove
> broken references. Ok - I worked around the problem by doing the other way
> around - the standard version didn´t have any references, but if the user

was
> somebody with AutoCad on the machine then references were created.
> But now, when the user without AutoCad is trying some actions that has
> worked before, Access is trying to compile ALL code (at least the code in

a
> module that has absolutely nothing to do with the event) and then

generates a
> compile-error because in that module I declare variables of AutoCads

types.
> Anybody have any explanation? Any ideas of how I can solve this?
> Thank in advance!



 
Reply With Quote
 
=?Utf-8?B?Q2Vhc2FyaW5h?=
Guest
Posts: n/a
 
      15th Feb 2005
Thank you for answering!
I do have a lot of code that I will have to go through and change if I must
change to LateBinding.
For now I have made 2 applications (one without any calls to Autocad).
I would like to understand why it worked in 97 but not in 2000?
Would it help if I konverted to 2002 or 3?
Regards,

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling asp.net code Tony Johansson Microsoft C# .NET 2 7th Jul 2011 12:34 AM
compiling asp.net code as in vb6 Arejan Microsoft ASP .NET 4 28th Jun 2007 07:35 PM
compiling code Hari Microsoft VB .NET 2 17th Aug 2004 08:21 PM
Compiling C++ Code ArunPrakash Microsoft C# .NET 2 4th Feb 2004 06:56 AM
Re: Compiling code david epsom dot com dot au Microsoft Access VBA Modules 2 30th Jul 2003 12:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:01 PM.