
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?