Public Function Not callable in Access Query

crisb184

Registered User.
Local time
Today, 03:42
Joined
Aug 30, 2013
Messages
29
Hello,

I created a Public Function called fNetWorkDays in my access database, however, when I try to use it in an expression I get "Undefined function 'fNetWorkDays' in expression". The Public Function is in a standard Module in my vba project. Does anyone know why I cannot call it in my queries?
 
Check if you have named both the Module and Function with the same name. If Ues rename the module to something like, modulePubFunctions or something.

Make sure you first compile the CODE before using it in Queries.
 
Paul,

Thanks for the prompt response. I had the same name for both the Public Function and the module, I did this to make sure it would work, when really it was why it wasn't (go figure). Trust me i was googling this like crazy trying to solve on my own before posting here. As always you, and others in this great forum were quick to help.
 

Users who are viewing this thread

Back
Top Bottom