A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Call a function designated in a table



 
 
Thread Tools Display Modes
  #1  
Old September 29th, 2004, 04:57 PM
Cosmic
external usenet poster
 
Posts: n/a
Default Call a function designated in a table

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?

  #2  
Old September 30th, 2004, 09:18 AM
Peter R. Fletcher
external usenet poster
 
Posts: n/a
Default

Look at Help for the Eval() Function - I think that it is what you
need.


On Wed, 29 Sep 2004 08:57:04 -0700, Cosmic
wrote:

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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Hyperlink Call Subset of Table? Tom Using Forms 8 August 12th, 2004 12:39 PM
Name not showing ID is René Setting Up & Running Reports 11 June 29th, 2004 01:40 AM


All times are GMT +1. The time now is 11:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.