Undefined function 'XXXXX' in expression (1 Viewer)

wbohlin

New member
Local time
Today, 09:36
Joined
Jan 15, 2012
Messages
9
I'm new to Access and VBA, so please bear with me. (I'm a 'C' programmer)
I'm using Access 2010 and created a module with VBA called "XXXXX" (not it's real name) and the module contains one function of the same name. In Query design mode, I can click on functions and find it, but when I try to run the query, I get the error msg: "Undefined function 'XXXX' in expression. In reading other postings, I have tried the references issue and that doesn't apply.
What am I doing wrong?
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 09:36
Joined
Aug 30, 2003
Messages
36,118
The function can not have the same name as the module.
 

wbohlin

New member
Local time
Today, 09:36
Joined
Jan 15, 2012
Messages
9
Thank you, That fixed the problem! ;)
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 09:36
Joined
Aug 30, 2003
Messages
36,118
No problem, and welcome to the site!
 

Darth Plagueis

New member
Local time
Today, 09:36
Joined
Jun 4, 2019
Messages
2
What if the error persists despite ensuring both names are different?

Regards,
DP
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 09:36
Joined
Aug 30, 2003
Messages
36,118
Oh, and if it's a custom function rather than a built-in function, make sure the function is in a standard module, not behind a form/report.
 

Users who are viewing this thread

Top Bottom