My mistake, Steve. Somewhere along the line I thought you were hitting a SQL Server back end. I don't know enough about Access UDFs to comment too specifically. But I think that Eric's earlier comment suggesting that you create an Access query and execute the query is the right way to go. You can do this, IIRC, by using the connection's Execute() method and simply calling the public query... something like this:
oRS = oConn.Execute("Q_MyQuery")
>Vin,
>That is actually what I was trying to do:
>INSERT INTO tblTemp SELECT MyUDF(A.Full_name) AS LName FROM EMPLOYEES AS A
>
>I tried putting the Public MyDDF() in the SAME Form module, in another Class module, and in a Standard module.
>But, MyUDF() was always undefined. What is the "dbo." ? Any idea where I should put MyUDF()?
>
>BTW, I'm using VB6 and connecting to an Access97 database via ADO. Both tables are in the Access database.
>
>Thanks for trying to help.
>
>
>
>>>>
>You can, however call the UDF as part of a select statement to acheive the result:
>
>rs.open "SELECT dbo.MyUDF('param1', 'param2') AS Result"
><<<
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell