From context, I infer that you are referring to somehow re-using Access modules in multiple applications. If that is correct, I have had some success.
The issue often is recognizing when you can get away with re-using code and when you can't. Here are some thoughts in no particular order.
If you are going to design a general module to do something commonly done, don't forget to define required data elements in the specific module's declaration area, even if you want the values to be public within the application.
If you are going to reference something outside of your general module, always pass in anything that might even remotely be considered foreign to your module. For example, always pass in a form name or an Access.Form object (this is a trivial case). Always pass in user identification data rather than relying on being able to get it globally.
In other words, avoid programming side-effects to the greatest extent possible.
Another thing I've found is useful in this context is to "think primitive." By that, I mean more specifically to set very modest goals for individual modules. Think along the lines of implementing "primitives" - say, for example a set of actions such as
- Open a workbook given a file spec and an Excel Apps object
- Open a worksheet and select it given an opened workbook with sheets
- Fill in a single cell (with text and attributes) given worksheet object, row, column, text, color choices
- Determine the attributes of a cell given worksheet object, row, and column
- Determine the number of non-blank rows given worksheet object and column (or maybe the column with the greatest number of rows)
- Determine the number of non-blank columns given worksheet object and row (or manybe the row with greatest number of columns)
- Create a new worksheet (and select it) given a workbook object
- Close the workbook (and update it) given a workbook object
These are primitive operations selected here for the sake of discussion. Sure, for this case it isn't that hard to do these directly in VBA code. But the idea being illustrated is that you should think about elementary functions, not huge hulking complex routines. The more complex your routine, the more likely you are to have to "bang on it to make it fit" (square peg, round hole concept).
I've made this work for Excel operations, Word operations, Outlook operations, Windows operations, Access Control Appearance operations (formatting my controls in consistent and meaningful colors), security arbitration functions ... each in its own module that has at least some level of generality.
Does this help?