[AccessD] Use a Class in a Library.mdb - Lebans' Calendar

Charlotte Foust cfoust at infostatsystems.com
Thu Jun 19 14:34:34 CDT 2008


You have to expose the class object you're going to create in the
library file, not just put it there.  If I remember correctly, you need
a public method for returning an instance of the class in question.

Charlotte Foust

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
Sent: Thursday, June 19, 2008 11:33 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Use a Class in a Library.mdb - Lebans' Calendar


Hello to all you class experts out there!

Yesterday I downloaded Lebans' calendar - and it looks great!  I worked
with it yesterday in a copy of a customer system and it's working well

But - this will be identically used at each customer, so I want to put
the class module and the four standard modules that make up this
calendar into my Library.mdb file, which is used identically at each
customer.

In one of the forms where the calendar will be used, the instructions
are to put the following code into the Load event like this:

   Private Sub Form_Load()

       '-- Create an instance of our Class
       Set mc = New clsMonthCal
    
       '-- Set the hWndForm Property
       mc.hWndForm = Me.hWnd

   End Sub

So, with Lebans' code out of this .mdb and placed into the Library.mdb,
the second line does not compile.  This .mdb references the Library.mdb.

Can I change something so that I can place Leban's class module and
standard modules in my Library.mdb instead of putting it in every
customer's .mdb?

Thanks for any help and suggestions!
Dan

--
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