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!

Open a stored procedure in ADP w/ Form

Status
Not open for further replies.

cschan80

MIS
Feb 19, 2003
4
US
I am trying to open a stored procedure in ADP using a form. There is a button that I will use to open the stored procedure and I am using the following VBA behind it. It gives me an error...saying that the stored procedure is not found.

DeanProcedure is the stored procedure that i am trying to open.

Private Sub Command1_Click()
On Error GoTo Err_Command1_Click

Dim DocName As String
Dim LinkCriteria As String

DocName = "DeanProcedure"
DoCmd.OpenQuery DocName, acViewNormal

End Sub

Any help that I can get will be very much appreciated.

Thanks,
chris
 
Nevermind,

figured it out...dumb question.

for all those who need the code:

Private Sub Command1_Click()
On Error GoTo Err_Command1_Click

Dim DocName As String
Dim LinkCriteria As String

DocName = "DeanProcedure"
DoCmd.OpenStoredProcedure DocName, acViewNormal

End Sub
 
I assume you are the database owner (dbo). Normally, it is a good idea to prefix the objects such as stored procedures or tables with dbo.table if you roll the app out to a user who is not the database owner. This way you won't get a error when they try to execute the object.

DocName = "dbo.DeanProcedure"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top