Call a function designated in a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
Look at Help for the Eval() Function - I think that it is what you
need.


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?


Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
Back
Top