Undefined function 'xxx' in expression. Access 2013

Anonymous
2015-08-05T00:17:17+00:00

Hi,

I am having the same problem as defined and answered in this post:

http://answers.microsoft.com/en-us/office/forum/office_2013_release-access/why-has-date-stopped-working-in-access-2013/62f52fbb-e846-447f-af38-1f5b52e314d8

However upon opening the references list in VBA - I have no references marked as Missing.

The only references I have selected are:

I have created a test database with one table, one module, one function and one query.

Can anyone advise what I need to do to get the UDF to work in my query?

Thanks.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Tom van Stiphout 40,096 Reputation points MVP Volunteer Moderator
    2015-08-05T04:20:03+00:00

    No problem.

    In this case the module name is the same as the function name, which confuses Access.

    One more reason to use a naming convention with prefixes for the various object models.

    8 people found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Tom van Stiphout 40,096 Reputation points MVP Volunteer Moderator
    2015-08-05T03:04:25+00:00

    Can you post that test db to a public place like a free OneNote account?

    My guess is you have a query that uses CatsCode, and Access thinks it's a function. For fun, in a standard module create this function:

    public function CatsCode() as string

    CatsCode="abc"

    end function

    You may even set a breakpoint in this function, and inspect the call stack.

    0 comments No comments
  2. Anonymous
    2015-08-05T03:50:28+00:00

    Hi Tom,

    Thanks for your response.

    You are correct, I do have a query that is using CatsCode and yes, it is a function.

    Am I missing something?  Can UDFs not be used in Access Queries?

    I have uploaded the broken database here - the error occurs when I attempt to execute "Query1"

    https://drive.google.com/file/d/0B0-pTlvLXmWYYkpORVVmWUpCNGc/view?usp=sharing

    Thanks very much for taking a look at this.

    -Rowan

    0 comments No comments
  3. Anonymous
    2015-08-05T04:23:22+00:00

    Thank you.

    0 comments No comments