Call Module Function using string value 
Author Message
 Call Module Function using string value

I have stored a list of items and their 'class' in a table.  Field objTYPE
holds a text like 'MACRO', 'QUERY', or 'MODULE'.  Field objNAME is the text
name of the saved macro/query/module.  I have setup a form to display all of
these items in order as a 'to-do' list in an update.  The update code steps
through each record, reads the type, then runs that type.  If it's a query,
it runs DoCmd.OpenQuery objNAME.  For Macro, DoCmd.RunMacro objNAME.  When I
get to the module, i cannot find how to run the CALL statement without an
error.  I get an INVALID USE OF PROPERTY when trying to compile the code for
this form.  How do I use the CALL statement to run the module code with the
saved name in my text field?


Tue, 15 Jul 2008 04:30:02 GMT  
 Call Module Function using string value
Run objName
Quote:

> I have stored a list of items and their 'class' in a table.  Field objTYPE
> holds a text like 'MACRO', 'QUERY', or 'MODULE'.  Field objNAME is the text
> name of the saved macro/query/module.  I have setup a form to display all of
> these items in order as a 'to-do' list in an update.  The update code steps
> through each record, reads the type, then runs that type.  If it's a query,
> it runs DoCmd.OpenQuery objNAME.  For Macro, DoCmd.RunMacro objNAME.  When I
> get to the module, i cannot find how to run the CALL statement without an
> error.  I get an INVALID USE OF PROPERTY when trying to compile the code for
> this form.  How do I use the CALL statement to run the module code with the
> saved name in my text field?



Tue, 15 Jul 2008 04:52:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how do i call a function by using the function name as a string of characters

2. Calling module function in Default Value?

3. Calling functions/subs using the string title - possible?

4. Call function using strings

5. how to call sub/function of 1 module from another module

6. Carry value for a string variable from Form Class Module to code in Module

7. Call module functions from outside of module?

8. how to call 1 module's function/subroutine from another module in VBA

9. functions calls to module functions within a form

10. Access 2.0 16 bit module call to Access 7.0 32 bit module call


 
Powered by phpBB® Forum Software © phpBB Group