Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing a stored procedure through a command button

Status
Not open for further replies.

perfectchaoss

Programmer
Nov 6, 2002
44
US
Hi,
I am trying to execute a stored procedure in the onclick event of a command button. I already have the stored procedure working, i just need to be able to execute it. Here is what i have so far..
RunDTS is the name of my stored procedure.

Private Sub ImportNewItems_Click()
DoCmd.OpenStoredProcedure "RunDTS"
End Sub

(this returns the error: access cant find the object "RunDTS")
The procedure returns no parameters, it just has to execute.
any ideas?
 
Try this...

Code:
Private Sub ImportNewItems_Click()
     Call RunDTS()
End Sub

Ken S.
 
Ken,
Thanks for the quick reply, it gave me the message sub or function not defined. I may not have been clear enough in my original post.

The Stored procedure is on SQL enterprise manager and the access database is on a client PC.

Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top