How to use 'RunCommand' macro

M

MAC

I am an experienced Access programmer, but have been
unable to find any information on how to use the macro
command 'RunCommand'. This command has a single parameter
that can be selected (eg. bringtofront, copy, find,
import, and many more).

For example, If I select RunCommand with a parameter of
import. There are no other parameters to select files,
target or anything else. If the macro is run it errors
out with 'isn't available now'.

While I know that I can use Transfer Text to accomplish
the same thing(import), there are many other potentially
useful commands.... If I could just figure out how to use
them. Thanks!
 
S

Steve Schapel

MAC,

In general, the RunCommand macro action replicates the activity of
selecting the equivalent command from the Access Menus. There are no
parameters at all, and only a single argument to indicate the menu
command. In the example you gave, i.e. the Import argument, this has
the same effect as selecting Import from the File|Get External Data
menu, i.e. it opens the Import dialog window. Of course, there are
times when various menu commands are not available, for example the
SaveRecord command is not applicable if the focus is on an object in
design view, etc, etc, so I assume this is the reason why you get an
'isn't available now' error, i.e. the File|Get External Data menu is not
available if the focus is on a macro design window.

Hope that helps.
 

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