Results 1 to 4 of 4
  1. #1
    cowboy is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    291

    What is the point of different modules?

    I am trying to understand what the point of different modules is. Is it just an organization thing?



    If I take a function and move it to a new modules will there be errors? Anything I need to watch out for?

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    I use different modules for organisation - there may be other reasons that I am unaware of.

    There won't be any problems moving functions to different modules - just make sure you do not have identical functions in different modules and you will be fine.

  3. #3
    c_smithwick is offline Underpaid Programmer
    Windows 7 Access 2003
    Join Date
    Jan 2010
    Location
    Lakeside, CA
    Posts
    49
    It does affect load/run times (although the difference is miniscule). A module is not loaded until the first time a function in that module is called, so theoretically if you have all of your functions in one module, with no form class modules, then that module will load once at startup and your database will run a bit faster, but like I said it is usually a very small, unnoticable difference. I usually have different modules for different functional areas of my program, for organization purposes, and if I'm troubleshooting, then I can look in one module depending on the area of the program I am dealing with. Personally, I don't like form class modules, so I put all my functionality in standard modules. Of course if you do that then you have to explicitly reference forms by name rather than using the "Me." shorthand, but I don't mind that, plus I can write a function that can be used by all my forms in one module instead of having to write it in the class module for each form. Ask twelve different Access gurus and you will get at least 23 different answers - your preference really.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by SoftwareMatters View Post
    just make sure you do not have identical functions in different modules and you will be fine.
    believe it or not I have run into problems naming a module object as the same name as a function in the module. i'd recommend not doing that either.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Managing Point in Time
    By Stressed in forum Programming
    Replies: 0
    Last Post: 03-01-2010, 08:47 AM
  2. Update Access Modules
    By Othello911 in forum Access
    Replies: 0
    Last Post: 01-06-2009, 08:39 AM
  3. update access modules
    By wallen in forum Programming
    Replies: 0
    Last Post: 01-06-2009, 08:22 AM
  4. Point of Sales Application
    By chico_yallin in forum Access
    Replies: 1
    Last Post: 06-23-2007, 05:30 AM
  5. How to use Modules
    By wasim_sono in forum Access
    Replies: 0
    Last Post: 01-16-2007, 06:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums