[AccessD] Where does WithEvents go?

John Colby jcolby at colbyconsulting.com
Fri Jun 6 18:14:42 CDT 2003


Shamil,

None of the properties that are exposed when the class is exported to a text
file is visible from within Access.  What I don't quite understand is why
you wouldn't simply set both of the properties I discussed to true and
directly see the classes from any database referencing the library.  Doing
this allows seeing all of the class properties, functions etc, as well as
directly dimensioning a class variable.

What does the wrapper buy you?  It seems like extra work, an extra layer
that things have to go through, as well as an extra layer that I have to
write (the helper function).  We don't do that with the libs that MS
publishes do we?

And yes, the ClassExposer add-in would be nice.  It appears that the object
on your site is compiled - I can't open or convert it in A2K.  I could
certainly write my own if I need to.

John W. Colby
www.colbyconsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Shamil
Salakhetdinov
Sent: Friday, June 06, 2003 6:50 PM
To: AccessD
Subject: Re: [AccessD] Where does WithEvents go?


<<<
> If MyClass is in a lib, then this dim statement doesn't work since MyClass
> isn't exposed.
>>>
John,

But you can dimension the class specifically as that class type if this
custom class's Instancing property is set to PublicNotCreatable. Then you
create instance of this class using wrapper/helper function. And you can
sink an event of this class declared as public.

Instancng is a standard property for custom class modules in MS Access 2000
and XP.

Are we talking about different things?

Shamil

P.S. Unfortunately I don't see Instancing property for Forms' and Reports'
modules (am I missing it?) - so maybe ClassExposer Add-In for MS
Access2000/XP to expose forms' and reports' modules isn't a totally crazy
idea....

----- Original Message -----
From: "John Colby" <jcolby at colbyconsulting.com>
To: <accessd at databaseadvisors.com>
Sent: Saturday, June 07, 2003 12:10 AM
Subject: RE: [AccessD] Where does WithEvents go?


> Shamil,
>
> I don't understand how to sink an sourced from a class in a library
without
> being able to dimension the class specifically as that class type
>
> dim withevents SomeCls as MyClass
>
> If MyClass is in a lib, then this dim statement doesn't work since MyClass
> isn't exposed.
>
> John W. Colby
> www.colbyconsulting.com




More information about the AccessD mailing list