I am programming an Access 2007 (accdb, not adp) frontend at connect to a SQL Server 2005 backend. How can I call a scalar user defined function from my vba code?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Dim rst As ADODB.Recordset
Set rst = Connection.Execute("SELECT dbo.MyFunction('" & Me.field & "')")
回答2:
Create a query that calls the function.
SELECT [FirstName], [Surname]
FROM dbo.FindCustomersOrderByDesc();