Question : Problem Importing and Running Modules

I have created a couple Modules that I run via a Macro in Access.  They run perfectly in the database that I created them in, but when I import the Macro and the 2 Modules into another Access database and try to run them from there I get an error "The expression you entered has a function name that Microsoft Access can't find."  I have little knowledge about how VB and Access work together and I must be missing something here.  Is it not possible to simply transer Modules from database to database and run them?  Help, please!  Thanks,  Joel

Answer : Problem Importing and Running Modules

Take a look at this:
The IsCompiled property returns a Boolean value indicating whether the Visual Basic project is in a compiled state.

Setting

The IsCompiled property is available only by using Visual Basic and is read-only.
The IsCompiled property returns True (–1) if the project is in a compiled state.

Remarks

You can force Visual Basic to compile the project from the user interface while in module Design view by clicking Compile All Modules or Compile And Save All Modules on the Debug menu.
The IsCompiled property of the Application object is False (0) when the project has never been fully compiled, if a module has been added, edited, or deleted after compilation, or if a module hasn't been saved in a compiled state.

It is possible to automate the compiling process.  I have not done it because I compile as I go, but I am sure it would not be too difficult to check iscompiled on app start and if not, compile.  Even if you had to use sendkeys...
Random Solutions  
 
programming4us programming4us