Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Posts
    112

    Question Unanswered: a module, a class module ??????

    Could anybone define what each of the following are actually used for:
    :a module
    :a Class module

    I have write database applications but have never included any of the above and would like to know how they could benefit my applications if I actually new what they did!.

    Thanks.

  2. #2
    Join Date
    Jun 2002
    Location
    Saudi Arabia / Philippines
    Posts
    126
    saltman,

    You don't ask for much do you? I think an appropriate answer would be: "Do you want the short answer or the long answer?" The short answer would be facetious or rude; the long answer takes about three weeks.

    I have write database applications but have never included any of the above and would like to know how they could benefit my applications if I actually new what they did!.
    But I bet you have - unknowingly! If you have ever used a wizard to specify the action a command button should take then you have used a module, a class module in fact.

    Basically modules are 'containers' for procedures (programs) written in Visual Basic for Applications (VBA) language. You may place all your procedures in one single module or logically group your procedures into many modules. You need procedures to give you additional functionality over the base functionality provided by Access. The wizards generate procedures based on the answers you give to certain questions.

    Class modules differ from modules in that class modules provide the functionality for Object Oriented Programming (OOP). All Access entities are objects and behind all Forms and Reports you will discover a class module if you ever look in the VBA code window (Alt + F11). This is why I said you unwittingly used a class module because the code for your command button would have been generated in the relevant class module for that form.

    How could they benefit you? Well if you ever want to go beyond the basic features provided by Access then there is no other way. Just as an example, I have just completed a system that interrogates and retrieves data from an Oracle database, manipulates that data within Access, and then initiates a MS Project session with the processed data. This is only possible using modules and procedures inside those modules.
    Rod

    fe_rod@hotmail.com

  3. #3
    Join Date
    Sep 2004
    Posts
    112
    Wow!- I didnt expect that reply, cheers. I will have a look at the code behind my forms and hopefully grasp it.
    Again many thanks for your excellent reply.

    Darren.

Posting Permissions

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