Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Module, Class Module, Procedure.

Status
Not open for further replies.

Muzzy

Programmer
Dec 14, 2001
68
GB
Hi All,

Can anyone give me an explanation of Module, Class Module and Procedure, and when, where and why I should use them.

Cheers

Muzzy
 
Hi Muzzy,

Module: A module in which you place Sub and function procedures that you wish to be available throughout the rest of your DB.

Class Module: A module that will contain the definition of a new object. You can declare DB and recordset objects etc, using a class is similar, when your create a new instance of a class you create the new object. The procedures within the class are the properties and methods of the object that you can call for the object.

Procedure: Is a named sequence of statements that will be executed as a unit, a procedure can be a function, sub or property.

You use modules for code that you want to be available throughout your DB, procedures are defined within modules and class modules are used to create a new object. Regards,
gkprogrammer
 
Cheers, Thats a great help!

Muzzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top