User-defined Functions in Access Add-ins

User-defined Functions in Access Add-ins

Post by RG91Z1 » Thu, 02 Mar 2006 08:19:27


I'm having trouble getting functions that reside in a code module in an
Add-in that I created to show up in the expression builder. or even work at
all. I've even tried to add a record for each function to the USysRegInfo
table, but that still does not work. If I try to use the function in a
query, it returns an error. Any help would be greatly appreciated.
 
 
 

User-defined Functions in Access Add-ins

Post by Alex Dyben » Thu, 02 Mar 2006 18:08:18

Hi,
If you want to use functions from library mdb - you have to add a reference
to it (menu tools-references), you don't need to add entries to USysRegInfo
table
HTH

--
Alex Dybenko (MVP)
http://www.yqcomputer.com/
http://www.yqcomputer.com/

 
 
 

User-defined Functions in Access Add-ins

Post by RG91Z1 » Thu, 09 Mar 2006 06:21:27

Thanks Alex.
This worked when I added the reference to the .mda manually; however, the
functions still wont appear in the expression builder. I guess the reason
that I'm so focused on the expression builder is because after adding 5 or
more functions to the .mda, its not likely that I (or potential users) will
remember all the required arguments so I thought it would be nice if they
would show up in the expression builder as the other built-in functions do.
Anyhow, thanks for the feedback..perhaps the add-in is the wrong approach??

Is there an application-level event that can add the reference to the code
library in the .mda when access opens?
 
 
 

User-defined Functions in Access Add-ins

Post by Alex Dyben » Thu, 09 Mar 2006 18:31:17

Hi,
i think that in order to use library functions in expression builder, or
queries - you have to add wrapped functions in main MDB.

--
Alex Dybenko (MVP)
http://www.yqcomputer.com/
http://www.yqcomputer.com/