Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2002
    Posts
    403

    Unhappy Unanswered: I don't get Class Modules

    Okay, maybe I am a bit slow or maybe I am looking at these in a complicated manner, but I have read Alison Balters Desktop Development and the Access Desktop Development Handbook sections on class modules, and I still don't get them. Every now and again I see a slim glimmer of light as to how to use them, then it eludes me.

    Does anyone have a simpletons explanation or a website that turned the lights on for them?

  2. #2
    Join Date
    Jul 2002
    Posts
    67
    What about class modules do you not get? If you can be a little more specific than I or someone else can help.

    Don't worry, it took me a while to fully understand the theory/science behind class modules and how to use them. Now, I use them all the time, especially in VB and MS Access development.

    Afterthought...Class Modules can contain user defined properties and methods(functions) that can be used through out your entire database application. You use these funtions and userdefined properties by instantiating an instance of your Class Module in a form or report module.

    Example:
    Dim <variable> as <Class Module>
    Set <variable> = New <Class Module

    .....and then wright code that uses your Class Module

    Macros are limited in their power. True power of MS Access comes out when you code in VBA and use tools such as Class Modules.

    I hope this helps!! Like I said, get back to us with specifics.
    Don't do today, what can be done tomorrow.

  3. #3
    Join Date
    Feb 2002
    Posts
    403
    Okay specifics like what would you use them for?

  4. #4
    Join Date
    Jul 2002
    Posts
    67

    Post

    If I have time today, I will try and post a code example of something I developed recently. If not, I will do it asap.
    Don't do today, what can be done tomorrow.

  5. #5
    Join Date
    Jul 2002
    Posts
    67
    Quick Reply: Lately, I have been using class modules in working with Collections and Reports. By creating my own properties in a class module I can than fill the user-defined "Name" property through a collection and then display the data in a report. That's just one of the million and 1 ways to use a class module.

    I highly recommend the book by Sybex: Access 2000-Developer's Handbook (second edition ). It goes into great detail (w/examples) about using Class Modules and VBA in you Access Apps.

    Don't do today, what can be done tomorrow.

  6. #6
    Join Date
    Feb 2002
    Posts
    403
    I've read that, in fact I sweated over that chapter a coupla times, to try and grasp what they are doing and why.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •