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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I pass form field into criteria of stored procedure

Status
Not open for further replies.

toptech

Programmer
Apr 12, 2001
71
0
0
US
HI All.

I am converting and MDB to ADP.

I have a stored procedure that I created with 2 fields.

PropID needs to have the value of a form field passed on to the criteria box.

My Stored procedure is as follows(Qry_Append_Requisitions_Remove):

ALTER PROCEDURE [RIOCANMAIN\jfeintuch].Qry_Append_Requisitions_Remove
AS SELECT PropID, Del_Flg
FROM dbo.Tbl_Doc_Requisition
WHERE (Del_Flg = 1)


I will actually change this to a delete query once I understand how to pass the form field.

In my access form, I have the following:

Dim stDocName As String

stDocName = "Qry_Append_Requisitions_Remove"
DoCmd.OpenStoredProcedure stDocName, acViewNormal, acEdit


how do I go about doing this?

I am very new to adp and frustrated.

Thanks,

Toptech

Top Tech Systems

If you help 3 people and each one of those help 3 other people and so on, imagine all the people being helped.
 
You're going the wrong way!!!
For me if you are using a connection to a database, create and run queries from a vba code it's better and a faster way of working.
If you need help to create the queries go to the site and look for examples.
If you are trying to open an external Stored Procedure for example in an sql database you can have some problems. I tried to do that but it gave some errors of conection when using ADP project.
I think the error had to do with permissions.

I hope this helps you...
 
Hi Jose,

That is exactly what i did.

Thanks,

Jeff

Top Tech Systems

If you help 3 people and each one of those help 3 other people and so on, imagine all the people being helped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top