By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,222 Members | 1,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,222 IT Pros & Developers. It's quick & easy.

Can't find Function in Macro

P: 34
Here's an annoying one.

Using Access 2007, I've set up a macro which includes:
RunCode TRK001MCATSPathwayCases ()

The function called is a Public Function.

When running the macro I keep getting an error message:
"The expression you entered has a function name that Microsoft Office Access can't find."

I've tried creating the entry manually as well as using the wizard to find the function. In theory, it's found the function (using the wizard), but when running, it says it can't. When executing it manually, it runs ok.

Any ideas?

Thanks in advance.
Jan 6 '09 #1
Share this Question
Share on Google+
4 Replies

Expert 100+
P: 1,923
Verify that TRK001MCATSPathwayCases () is the function name and not the module name.
Jan 6 '09 #2

P: 50
If your function is not in a module, then it doesn't matter if it is public or not, you will only be able to use it in the form that houses it. to be truly pulic, the function has to reside in a module.
Jan 6 '09 #3

Expert 2.5K+
P: 3,532
And as puppydogbuddy has hinted at, if the module name and function name are the same, this type of error will occur.

Welcome to Bytes!

Linq ;0)>
Jan 6 '09 #4

P: 34
That last comment by Linq was spot on. The module and function name were the same. All sorted now.

Many thanks for all input.
Jan 7 '09 #5

Post your reply

Sign in to post your reply or Sign up for a free account.