RunCode from a macro

I would like to use the RunCode option in an Access macro. The code itself requires 2 parameters, the name of the report, and some text. If I were to run it in VBA it would be called by:
store_PDF Me, Me.file_location

But I want to run it from a macro - how can I do it please?
rick_dangerAsked:
Who is Participating?
 
Jim Dettman (Microsoft MVP/ EE MVE)Connect With a Mentor PresidentCommented:
First, the code your calling needs to be a function, not a sub.

Second, if your passing something other then a literal value:

=store_PDF("myForm","C:\mypdf.pdf")

 then your going to need to call other functions for the arguments to get the values:

=store_PDF(GetCurrentForm(),GetFileLocation())

Jim.
0
 
Rey Obrero (Capricorn1)Commented:
0
All Courses

From novice to tech pro — start learning today.