Running a class module function 
Author Message
 Running a class module function

    I have created a function and  saved it as a module of my database.
I am only able to execute the module by opening the design view of the
module, ensuring that the cursor is positioned in the text of the
function and pressing 'run'. When i use the runcode command in a macro i

am told that Access can't find the module specified.
    Is there any way that i can run the function either through a macro
or from a command button on a form.



Sun, 15 Apr 2001 03:00:00 GMT  
 Running a class module function
Hi Paul,

Try prefixing Public to the function declaration.

Public Function HelloWorld()

end Function

Also, try to Compile and Save All MOdules before using RunCode.

HTH
--
Dev Ashish    (Just my $.001)
The Access Web ( http://home.att.net/~dashish )
----

:    I have created a function and  saved it as a module of my database.
:I am only able to execute the module by opening the design view of the
:module, ensuring that the cursor is positioned in the text of the
:function and pressing 'run'. When i use the runcode command in a macro i
:
:am told that Access can't find the module specified.
:    Is there any way that i can run the function either through a macro
:or from a command button on a form.
:



Sun, 15 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Class modules 97 - Refering to array within a custom class module

2. Accessing procedures of a class module from another class module

3. Current class module and function

4. Calling a Function in an MS Access Class/Form/Module from an outside application

5. Direct 3D functions modules/wrappers/classes etc

6. Functions vs Class module

7. Class Modules: Property Get or Function ???

8. return a structure from a function in a class module

9. Form, module, class and sub or function names at runtime

10. Classes, modules where is it best to put related functions with regards of speed

11. Class Module Functions

12. Passing Array to Class Module Function

 

 
Powered by phpBB® Forum Software