[AccessD] Classes not recognized in mda

Hale, Jim Jim.Hale at FleetPride.com
Wed Jun 22 11:32:22 CDT 2005


Got it! I was pasting instead of inserting. It works now, Muchas Gracias.
BTW I reviewed the "sacred" framework discussion emails and found your
detailed description of how to move classes to libraries. For anyone who
wants to search the archives it is (surprise) "Framework Discussion - Moving
to a library". How did you discover this stuff? It is not discussed anywhere
else that I've seen. 

Jim Hale


-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Wednesday, June 22, 2005 11:08 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Classes not recognized in mda


Jim,

These things should not even be visible when you pull them back in.  You
MUST:

1) Delete the old class - make SURE you exported it first <grin>
2) INSERT a new (blank) class
3) INSERT the file into that class
4) SAVE the new class

When you do it this way you should not even be able to SEE the ATTRIBUTE
keyword.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hale, Jim
Sent: Wednesday, June 22, 2005 11:59 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Classes not recognized in mda


The new class doesn't like the Attribute keyword. Am I missing a reference
perhaps? Jim Hale

-----Original Message-----
From: John W. Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Wednesday, June 22, 2005 10:22 AM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Classes not recognized in mda


Yes, you have to:

1) Export the classes to text files
2) Edit the text file to set two properties
3) Delete the original class in your lib.
4) Insert a new class
5) Insert the file into that class.  
6) Save the new class.

The top of an exported class will look something like:

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "clsSysVars"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Compare Database
Option Explicit

You need to change it to look like:

Attribute VB_Name = "clsSysVars"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True

Notice all the stuff I got rid of, and also notice that I changed two
properties from False to True.

That should take care of you.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hale, Jim
Sent: Wednesday, June 22, 2005 11:01 AM
To: 'Accessd (E-mail)
Subject: [AccessD] Classes not recognized in mda


I have moved some classes and modules out of the front end into a code
library. I set the same references in the code library as in the front end.
In the front end I set a reference to the code library. The FE recognizes
the functions in the library modules fine, no problems but doesn't recognize
the classes (i.e. I get an error in the FE when I try to instantiate the
moved classes). The code ran fine when the classes resided in the front end.
I am obviously doing something simple wrong. Any suggestions? TIA Jim Hale

***********************************************************************
The information transmitted is intended solely for the individual or entity
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. If you have received this email
in error please contact the sender and delete the material from any
computer. As a recipient of this email, you are responsible for screening
its contents and the contents of any attachments for the presence of
viruses. No liability is accepted for any damages caused by any virus
transmitted by this email.


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

***********************************************************************
The information transmitted is intended solely for the individual or entity
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of or
taking action in reliance upon this information by persons or entities other
than the intended recipient is prohibited. If you have received this email
in error please contact the sender and delete the material from any
computer. As a recipient of this email, you are responsible for screening
its contents and the contents of any attachments for the presence of
viruses. No liability is accepted for any damages caused by any virus
transmitted by this email.


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.


More information about the AccessD mailing list