[AccessD] Classes In Referenced MDE

Shamil Salakhetdinov shamil at users.mns.ru
Wed Dec 12 08:01:59 CST 2007


John,

I must say I do not know where the sources are - but AFAIKR there is nothing
tricky there: 

- you have described procedure in your another post in this thread and the
ClassExposer add-in just implements this procedure by using:

- DoCmd.OpenModule...
- getting all the module's text into file;
- prefixing this file with requested attributes;
- loading fixed file text back into module;
- saving module to mdb...

That's basically it.

What didn't work in your procedure with save?

Did you use MS Access 97 or MS Access 2000 and above?

For MS Access 2000/XP/... the procedure is different - you have to use
Microsoft Visual Basic for Applications Extensibility 5.3 ?

Did you use its Object Model?

It didn't work?

--
Shamil
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Wednesday, December 12, 2007 4:18 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Classes In Referenced MDE

Shamil,

I was disappointed to find that the cExposer was an MDE.  I wanted to learn
your secret of saving the class once imported back in to the database.  I
got as far as that myself but could never get the save to happen.  Did you
solve that or did you simply have the person save the database and answer
Yes to the save prompts? 


John W. Colby
Colby Consulting
www.ColbyConsulting.com 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Wednesday, December 12, 2007 7:10 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Classes In Referenced MDE

Hello Andy,

No legal way with Access 97...

"not legal" but used by several developers and worked well for them - here
it's:

http://smsconsulting.spb.ru/shamil_s/articles/cexposer.htm 

Please take into account that if you use VSS then it will clear the flags
which can be set by the referred above add-in....

HTH...

--
Shamil
 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey
Sent: Wednesday, December 12, 2007 1:42 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Classes In Referenced MDE

Hi Shamil
Thanks for this. Sounds like what I need except that I can't see how to set
the PublicNotCreatable property. Can you talk me through that? And before we
go any further I'd better admit this is A97 in case that blows this.

--
Andy Lacey
http://www.minstersystems.co.uk



--------- Original Message --------
From: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
To: "'Access Developers discussion and problem solving'"
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] Classes In Referenced MDE
Date: 12/12/07 11:32


Hello Andy,

This is a feature by design: you cannot have Creatable custom classes in a
library MDB/MDE.

Although you can have PublicNotCreatable custom classes (you can set this
property via custom class's properties window in VBA IDE, default value is
private) in your library MDB/MDE: they will be visible in FE but you can't
use New keyword to create their instances in FE - the hint/"trick" is to use
helper functions to create instances of these classes in library MDB/MDE....

There are also "dirty" tricks to make custom classes in MDB/MDE creatable
using New keyword in FE but I'd not recommend using them and therefore I'd
not write more on them here...

HTH...

--
Shamil

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey
Sent: Wednesday, December 12, 2007 12:49 PM
To: Dba
Subject: [AccessD] Classes In Referenced MDE

Hi all
I've been experimenting with creating a library of standard functions in
anticipation of a new project. Created MDB, imported modules with standard
functions, created MDE from that and then referenced that MDE in my FE. All
fine and dandy.

Then imported into my library a class module. Recreated MDE. This time
though my FE fails to compile because it doesn't like my Dim of a new
instance of the class - unknown user-defined type. Question is am I doing
something wrong or is this a limitation, ie that class modules must reside
in the FE from which they're called. One of you class experts is sure to
know this one.

--
Andy Lacey
http://www.minstersystems.co.uk

________________________________________________
Message sent using UebiMiau 2.7.2

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

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

________________________________________________
Message sent using UebiMiau 2.7.2

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

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

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




More information about the AccessD mailing list