You do not use the module - you execute the routines / functions that are stored in the modules.
If you put the code in a stand-alone module and do not specify a scope in the definitions of your routines / functions, they will be publicly accessible by default and can be called from anywhere in your application. This means that you can call them using RunCode in a macro, from form / report class modules, from stand-alone class modules, or for functions from SQL (with some caveats).
Given that you were trying to inject into VBA what you thought was too complex for SQL, SQL is the likely context in which you want to execute the code. Thus, you should simply be able to call your function in an SQL statement:
SELECT MyTable.PersonID, MyTable.FirstName, MyTable.LastName, FormatAddress([Address], [City], [State], [Zip], [Country]) As Address FROM MyTable;
This SQL calls a public function called FormatAddress (), which takes address components as arguments and formats them accordingly. This is a trivial example, because for this purpose you most likely will not need a VBA function, but the fact is that this is how you call the functions from the SQL statement.
Subprograms (i.e. code that does not return a value) cannot be called from SQL statements.
source share