Call a function designated in a table

C

Cosmic

I want to provide a list of reports or pdf files that the user can generate.
Some of the reports use openreport and some will need to create an adobe form
and call adobe reader. So I created a table with the Name, Type, and Action.
I want to perform the Action designated in the Action part of the table.
For example in the Table
Name: Insurance Form
Type: pdf
Action: fctInsuranceForm(SalesID)
OR
Type: rpt
Action: DoCmd.OpenReport "rptInsuranceForm"

' ...get the table into rs, then

Select Case rs("Type")
Case "pdf"
'This is not working, but want to call the function in Action, something
like this:
Call rs("Action")
Case "rpt"
'This is not working, but want to call theOpenReport, something like this:
rs("Action")
End Select

How can I call an action from a table?
 
Top