[AccessD] Where does WithEvents go?

A.D.Tejpal ad_tp at hotmail.com
Sat Jun 7 00:02:23 CDT 2003


Shamil,

    Could you kindly send me a copy of the version suitable for Access 2002 (as & when ready).

Regards,
A.D.Tejpal
--------------
  ----- Original Message ----- 
  From: Shamil Salakhetdinov 
  To: accessd at databaseadvisors.com 
  Sent: Friday, June 06, 2003 23:31
  Subject: Re: [AccessD] Where does WithEvents go?


  > Just as an aside, I now routinely go through
  > this process so that each and every class is exposed.
  John,

  Do you do that manually of you've an add-in?
  I've a ClassExposer Add-In for MS Access 97:

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


  If you and/or other developers from this group need something like that for
  MS Access 2000/XP I think I can make a conversion.

  On the other hand I'd strictly recommend TO NOT use exposed CREATABLE
  classes/forms/reports - and use wrapper/helper/class factory code to create
  custom classes' instances - IMO using class factories makes your  coding
  more organized and easier to debug...

  Shamil

  ----- Original Message -----
  From: "John Colby" <jcolby at colbyconsulting.com>
  To: <accessd at databaseadvisors.com>
  Sent: Friday, June 06, 2003 6:13 PM
  Subject: RE: [AccessD] Where does WithEvents go?


  > LOL.  I think the man is happy!
  >
  > You're welcome!
  >
  > Just as an aside, I now routinely go through this process so that each and
  > every class is exposed.
  >
  > BTW, I learned about this from using an FTP class from Dev Ashish and
  Terry
  > Kreft.  It came in a lib, and worked just fine.  I tried to move it into
  my
  > framework lib and it no longer worked.  Of course I had simply imported
  it.
  > The process of importing a class apparently resets those two attributes
  back
  > to False (Thanks Microsoft for protecting us children).  It took several
  > days of research and asking (this list I believe, Shamil provided the
  answer
  > IIRC) to get the solution I passed on to you.
  >
  > John W. Colby
  > www.colbyconsulting.com
  >
  > -----Original Message-----
  > From: accessd-bounces at databaseadvisors.com
  > [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Bob Bedell
  > Sent: Friday, June 06, 2003 10:02 AM
  > To: accessd at databaseadvisors.com
  > Subject: RE: [AccessD] Where does WithEvents go?
  >
  >
  > Outstanding! Phenonmenal! This is great! Think of the endless
  possibilities!
  >
  > Oh, it worked...
  >
  > That's great John. clsInventory is now "creatably" exposed to my event
  sink
  > app, with custom events firing and all. Thanks for adding several
  productive
  > years to my life.
  >
  > Bob
  >
  >
  > >From: "John Colby" <jcolby at colbyconsulting.com>
  > >Reply-To: accessd at databaseadvisors.com
  > >To: <accessd at databaseadvisors.com>
  > >Subject: RE: [AccessD] Where does WithEvents go?
  > >Date: Fri, 6 Jun 2003 08:56:25 -0400
  > >
  > >Bob,
  > >
  > >Classes built directly in a library database are not visible outside of
  the
  > >library in VBA.  No Se Por Que.  I guess that since Microsoft considers
  VBA
  > >developers to be children, giving us such powers is considered
  dangerous -
  > >kinda like playing with knives or matches I suppose.  At any rate, it
  > >absolutely is possible to get your classes exposed such that they can be
  > >seen and used outside of the library.
  > >
  > >The easiest way to do this is to:
  > >
  > >1) Export the class to a text file.
  > >2) Open the class module with a text editor
  > >3) Look for two attributes at the top of the module.  Change Creatable
  and
  > >Exposed to True.
  > >4) Save the class and close the text file.
  > >5) In your library, click Insert / Class module
  > >6) In the editor window that opens, click Insert / File.  Navigate to and
  > >select the txt file that you saved the class in.  This will cause Access
  to
  > >pull in the contents of whatever file you selected and insert it in your
  > >class.  In this case it is the contents of the modified class.
  > >7) At the top of the class you will see something like:
  > >
  > >Option Compare Database
  > >Option Explicit
  > >
  > >VERSION 1.0 CLASS
  > >BEGIN
  > >   MultiUse = -1  'True
  > >End
  > >Option Compare Database
  > >Option Explicit
  > >
  > >Select and delete everything from the first Option down through the End.
  > >
  > >8) Compile and save the class
  > >
  > >The class will now be visible from any database that references your
  > >library.
  > >John W. Colby
  > >www.colbyconsulting.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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030607/7d4d84ed/attachment-0001.html>


More information about the AccessD mailing list