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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global Module

Status
Not open for further replies.

Ajwebb

MIS
Jul 31, 2003
153
GB
Can anyone please tell me how to create a Global Module?

Thanks

Anthony
 
All modules are global. Click Insert --> Module

VBSlammer
redinvader3walking.gif

[sleeping]Unemployed in Houston, Texas
 
Indeed - as our Texan friend has noted - a module created in the database window (in the MODULES) area, is "global", in that any process in the database can access it and use any procs or functions in it.

Modules created 'behind' forms are sometimes known as "Class" modules, and are known only within the FORM they are written for, for the most part.
Jim



If at first you don't succeed, skydiving probably isn't for you!
Another free Access forum:
More Access stuff at
 
A module is by definition global, but only those function and sub declared as Public are accessible throughout the application. Subs and Functions declared as private are only accessible from within the module.

Modules are not created behind forms. Subs and Functions can be created behind forms which if declared as Private can only be executed within the form. Subs and Functions declared as Public can be accessed from outside the form, provided that a fully qualified Form Object reference is provided.

Class modules are a completely different animal altogether. Thread thread705-686015 has a discussion about the differences between modules and classes.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
CC, just checked your thread as noted and I stand corrected (or perhaps , 'updated'). I guess part of the confusion we all seem to have sometime is the varying ways people define a "module". I just tend to think of a module as a collection of functions and/or procedures. If this collection of these guys is written within a form, I think of it as a "Code-Behind-Form" module.

I just thought I remembered seeing an explanation in an Access book somewhere that called CBF "class" modules, and code in a stand-alone module "Global" modules.

As long as it works.. :)

Jim

If at first you don't succeed, skydiving probably isn't for you!
Another free Access forum:
More Access stuff at
 
Yes, unfortunately you are correct, it is the inconsistent use of terminology that has led to many of these misunderstandings. And such misunderstandings, and even worse, misconceptions will continue until we, as the member of the IT profession discipline ourselves to use our terms properly. Of course, before that can happen, we'd all have to agree on what that term means.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top