Any help would be appreciated. I am working in an A2K/SQL 7 project (.adp)
environment. I'm trying to call a stored procedure from Access (either from
a form or function?), return an output parameter value, and set a control
on my form to that parameter. Seems easy but I'm bran new to ADO. I'm fairly
confident that my stored procedure is working correctly but when I set a
control in a form to =RunSP1() I get "#NAME?".
Thanks... CJ
Function RunSP1()
Set cmd = New ADODB.Command
With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = "EXEC SP1"
.CommandType = adCmdText
.Execute
End With
End Function
use pubs
go
Alter procedure sp1
as
select * from authors
go
.