Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling functions by name (dynamically)

Status
Not open for further replies.

albatross68

Programmer
Sep 19, 2008
3
GR
I was thinking of creating dynamic menus.

In my scenario, there a table where each record is a menu entry. It has a parent (to create a hierarchy) and an action.
The action may be:
- display a sub-menu (implemented using the table itself)
- run an external command (RUN a string)
- run an internal function (i.e. open a form to updete a customer)

The last one is a problem. Even assuming that all the functions that can be called by a menu item use the same calling convention (i.e. no parameters). I do not know how to call them. The menu table will probably contain the function's name, but I can't use
Code:
CALL <variablename>
I thought of writing a "dispatcher" function, but this would be long an would require update with each new form/report I create.
I was hoping there was a way I could dynamically call the function using its name. I am open to any ideas of how to do this more efficiently than by writing the "dispatcher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top