Hello,
You wrote on Wed, 22 Jun 2005 08:58:07 -0700:
P> i've successfully used a function result as the criteria for a query in
P> access mdb database (as in KB210388) but i cant use the function in a
P> similar query in an ADP database. I get the error: "ADO error
P> 'functionName()' is not a recognized function name". Can anyone show me
P> how to sort this out!
In mdb, the query with function is executed in Access, which has table,
query, and your function all in one bottle.
In adp, the query is sent for execution to sql server, which is another
program on another computer, therefore, it has no access to your adp and the
function.
The way around:
Let's say, your initial query, before you even applied KB10388, was:
select name from table1 where id=V
where V is your variable. Now if you want to send this to sql server, you
have to substitute the value of the variable _before_ you send it for
execution.
"select name from table1 where id = " & V
The limitation of this method is that you can't specify an expression
directly in form's datasource or in the rowsource of combobox. You have to
use a code in the program:
combo1.rowsource = "select name from table1 where id = " & V
Regards,
Vadim Rapp