Hi, David.
I have tested one query. I have checked to make sure the function in my
module in my external MDE are indeed public and they are.
Are you using a standard module or a class module in the library database?
If it's not a standard module, then you'll need to take some extra steps, or
modify the code, and/or use an older version of Access to make the public
function public to external applications. It's no go for Access 2002 and
2003 class modules in a library MDE database file, so you'll need a public
function in a standard module when using these two versions, or else modified
code for public functions in form and report modules.
Does the code in your current database compile? Make sure that it does and
that there aren't any missing references.
Are there any procedures in a module with the same name in either the
current database file or the library? No procedure can have the same name as
a module.
Are there any procedures in the current database named the same as
procedures in the library database? The current database procedure will be
used instead of the library database procedure. Developers commonly name
library procedures with a prefix such as "lib" or "wz" to avoid identical
names in other databases that may use the library database.
If there are multiple MDE database files involved, make sure that all MDE
database files in the chain have no missing references nor any other problems
that would prevent dependent database files from working properly.
What next, do I
have to create functions in my main application module which calls the
functions in my external MDE?
No.
I did something similar for my Macros.
If you're advanced enough to use library databases, then you no longer have
macros. You've already converted them to VBA procedures, complete with error
handling.
If you've followed all of the rules I've described above and still can't get
the query in the current database to recognize the library database's
function, then please post the SQL statement calling this library function,
post the formal parameters for the function, and post the name of the library
module and the type of module containing the function, because there's
probably something wrong with the syntax you are using. And let us know
which version of Access you are using, which database format the current
database is in, and which database format the library database is in, because
one of these factors may be interfering with what you are trying to do.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.