Hi Folks,
I'm looking for an example of calling a stored procedure and pass 1 parameter via vba. I have searched all the forums and can't seem to find a simple example. My stored procedure is called deleteccf (which deletes a record in a table called ccf)
The code is as follows:
Alter Procedure "DeleteCCF"
@ccfid int
As
DELETE
FROM
dbo.CCF
WHERE
ID = @ccfid
RETURN
I am looking to run the procedure from a button on a form and pass the value of a field call txtid to the @ccfid, in effect deleting the required record. I am wanting to do this through vba because I don't want the user to get prompted to delete a record.
Thanks in advance....
Fraser
I'm looking for an example of calling a stored procedure and pass 1 parameter via vba. I have searched all the forums and can't seem to find a simple example. My stored procedure is called deleteccf (which deletes a record in a table called ccf)
The code is as follows:
Alter Procedure "DeleteCCF"
@ccfid int
As
DELETE
FROM
dbo.CCF
WHERE
ID = @ccfid
RETURN
I am looking to run the procedure from a button on a form and pass the value of a field call txtid to the @ccfid, in effect deleting the required record. I am wanting to do this through vba because I don't want the user to get prompted to delete a record.
Thanks in advance....
Fraser