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:
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:
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.