Use of Modules

  • Thread starter Thread starter Mike J
  • Start date Start date
M

Mike J

I created a Module to declare Public variables to use
throughout the project. How do I use this module in the
other forms. Thhe module name is named RC_Module.
 
Mike,

If all you're doing is declaring public variables, then you don't do
anything. They will all be loaded into memory when any of those variables
are referenced in code.

For example, if you declare half a dozen variables in your module, and at
some point (presumably just after the database is fired up) you initialise
at least one of the variables' values, then ALL of the variables will be
loaded into memory (or more accurately, memory will be allocated to them).

To refer to the variables, simply call them by name. You don't have to
mention RC_Module.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
So if I use Modules from the DB menu and create a module
named RC_Module, I don't have to put that anywhere in a
form oor somewhere? Thanks
 
Back
Top