Can’t make “autokeys†work for “F1†anymore.

J

John Phelan

The macro is named, “autokeysâ€.
The Condition is, “Trueâ€.
The Action Name is, “runcodeâ€.
The Argument is, “=helprun()â€

This macro has worked for me in the past. Over a period of months I created
a series of revised applications, importing each revised version into the new
one from the previous version. Somewhere along the way, it stopped working.

Did something eventually not get transferred to a newer version? When I try
to run the macro, or when I press, “F1†on my custom tool bar inside my
application; I get the following error:

“The expression you entered has a function name that myappname can’t find.â€


John
 
S

Steve Schapel

John,

I do not understand the meaning of "True" in the context of a Macro
Condition.

The macro group would be named AutoKeys, and then within the macro
design of the AutoKeys macro, there is an entry required in the Macro
Name column, this normally being the keystroke required to run the macro.

Presumably you have a public function named helprun within your application?
 
J

John Phelan

I get an, "Action Failed" error which list the follow whenever I try to run
the macro:

The macro is named, “autokeysâ€.
The Condition is, “Trueâ€.
The Action Name is, “runcodeâ€.
The Argument is, “=helprun()â€
 
S

Steve Schapel

John,

I am sorry, I must not have been clear in my earlier reply, as you did
not seem to respond to any of what I wrote. I guess the main point here
is...
What is in the Macro Name column of the macro design window? Do you
mean the Macro Name, in the same line of the macro designer as the
RunCode action, is entered as autokeys, or do you mean the name of the
macro group, as seen under the Macros tab of the Database Window is
named AutoKeys? If the first, this is not correct. If the second, then
what is entered in the Macro Name column in the macro designer?

As a secondary point, what is the purpose of the "True" entry in the
Condition column, I can't make sense of that.

As a third point, can you confirm that you have a public function named
helprun within your application?

Thanks.
 
J

John Phelan

The Macro file, code name under the list of macros is named "autokeys".

In Design view, I have the following:

Column #1: Macro Name is, "{F1}"
Column #2: The Action is, "Runcode"
Function Name is, "=helprun()"

All without the, " " marks of course.

I don't understand the, "True" entry eitheir; it popt up in the error
message as mentioned in my previous e-mail.

I now how; but, where do you declare a, Public Function for, "helprun"?

John
 
S

Steve Schapel

John,

Ok, thanks for the further clarification.

This macro is calling a function called helprun, which is a user-defined
function and must be present somewhere in your database in a standard
module. If you go to the Modules tab in the Database Window, are there
any modules listed there. Open in design view and see if you can find
the helprun function. Maybe you can use the Edit|Find menu. If it does
not exist in your database, then obviously this is the problem. If it
does exist, make sure it is Public, and that it is in a standard module,
and that the module is not also named helprun, and that the coding of
the helprun function itself is correct.

Another thing to check... In the design view of your macro, display the
Condition column, by selecting Conditions from the View menu. Is there
anything entered in this column for the RunCode action?
 
S

Steve Schapel

John,

Thanks to MVP Ken Snell, I realise I overlooked something in my advice
to you. Apologies. The Function Name argument of the RunCode macro
action should not include the = sign. I think it should just be entered
as...
helprun()

I am pretty sure it would have worked with the = sign, even though not
strictly correct, in Access 97 and prior versions, which may explain why
it has worked for you in the past?
 

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