Macro newbi question

B

Bill

I've coded the following macro and I don't see why it does not
function properly. Even as I single-step the macro it doesn't run
the code specified in the Function Name field corresponding to
the condition action.

Condition Action
------------------------ ------------
Command() = "DBDist" Runcode run fx DBDistribution()
StopMacro
Runcode run fx ScrRes()

The intent is to run DBDistribution() if the invoking line command
includes the expression /cmd DBDist or ScrRes() if the expression
is missing.

Bill
 
K

Ken Snell \(MVP\)

Remove the "run fx " from the arguments. Just put the name of the function
and the trailing pair of parentheses in the arguments.
 
D

Douglas J. Steele

How are you passing DBDist to database?

The only way I'm aware of is to use a shortcut that includes the full path
to the msaccess.exe executable as well as the full path to the MDB file, and
then use the /cmd flag as well.
 
B

Bill

Ken, the "run fx" was simply meant to denote that
the function name that is associated with the Runcode.
In the Macro, only the function name itself is coded,
e.g., DBDistribution().

Thanks,
Bill
 
B

Bill

Hi Doug,
Yes, that turned out to be the crux of the whole
problems was how to format shortcut "Target"
and "Start In" fields. Once I got the thing running
from Start -> Run using the exact syntax given
with Command() HELP, it only became a question
of getting things right with both shortcuts and
Scheduled Tasks.

Thanks,
Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top