Am writing an application that uses a table to store all MENU Items in it, with descriptions, and a field with either a form name in it or a function name.

The menuing program reads the data from the table and populates the menu form with buttons etc...

The idea is simple. Once the button is selected the app will draw either the FORM NAME to load or a FUNCTION to execute.


1) How do I load a form with the information from the table. Have tried numerous things, but seem to have come up with a brain cramp. Tried this but it didn't work.

DIM newform as form
set newform = .fields(Procedurecall) <--- the var

another e.g.
dim newformstr as string
newformstr = "LOADTHIS"
dim aform as form
set aform = ?????(newformstr)

2) How do I execute a function in the same manner.

e.g. Table says function to be called is 'CALLME'
How do I execute this function.

Any help would be appreciated