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

Opening a Stored Procedure

Status
Not open for further replies.

cschan80

MIS
Feb 19, 2003
4
0
0
US
I am currently trying to open a stored procedure from a form in ADP. I can open the procedure with a command button using VB- easy.

I however, get popup parameter message boxes...i would like to be able to directly transfer the parameters from the form to the stored procedure.

I was wondering where the following code would need to go?
In Visual Basic for the button...if so, where?
In the header of the Stored Procedure...if so, where?
In the Input Properties of the form...didn't work.

@Department=Forms!Chris!Department
@hZipBegin=Forms!Chris!BeginZip1
@hZipEnd=Forms!Chris!EndZip1

Any help would be greatly appreciated...thanks

-chris
 
hi,

1.
You can use field Record Source to enter stored procedure name and Input Parameters for procedure parameters. For example

Record Source sp_check_me
Input parameters @A = [FORMS]![...], @B = ...

2. You can name form fields exactly as stored procedure parameters. During runinig, stored procedure gets proper data itself.

3. You can enter proper sql syntax in Form Open procedure, for example

Me.RecordSource = "sp_check_me" & _
" @A = " & value1 & _
" @B = '" & value2 & "'"

and some other methods

K.
 
On the data tab

Record source is the SP name

Input Parameters is the comma delimited parm list. I haven't done it for a while, if commas don't work then use semi colons.

@Department=Forms!Chris!Department,
@hZipBegin=Forms!Chris!BeginZip1,
@hZipEnd=Forms!Chris!EndZip1

or
@Department=Forms!Chris!Department;
@hZipBegin=Forms!Chris!BeginZip1;
@hZipEnd=Forms!Chris!EndZip1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top