Ah, ok....was under the impression you just wanted to run a stored proc.
(not return values from a t-sql function)
If you are going to return a value...then you can just use a reocrdset....
You can still use a pass-through query...but you just take the results form
a reocrdset.
dim rstData as dao.recordset
set rstData = currentdb.OpenRecordSet("YourPassThrouthQueryNameG oesHere")
msgbox "return value = " & rstData(0)
However, you are much better off to use a ADO connection for this. In fact,
you can execute any procedure via the connection object...and not even have
to use a pass through query.
MyADOConnection.YourProcName
So, here is some ado examples...as I don't feel comfortable suggesting to
use dao to grab data from a function on sql server.
http://msdn.microsoft.com/library/de...parameters.asp
Also, since you are not talking about using a storeed procedure..but a t-sql
defined function, then I might be miss-understanding your question.
(you likey have to create a stored procedure that uses that fucntion...and
return values that way).
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com http://www.attcanada.net/~kallal.msn