> How do I return the query result in a function to a module code
> caller?
If the query returns multiple records, you open a recordset on the
query. If there is only one value you are interested in, and it's a
stored query you are talking about, you can use DLookup to get it,
specifying the query name as the domain argument.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)