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!

Recordsource of form is SP with 2 parameters

Status
Not open for further replies.

smitan

Programmer
May 11, 2002
115
DK
SP:
Code:
ALTER PROCEDURE ysp_Test
	(@Param1 int, @Param2 int)
AS
	SET NOCOUNT ON
	Select * From tblTest 
	Where fldA Between @Param1 And @Param2
	RETURN
Depending on the values of the parms the recordsource of the form has to be set. Using one inputparm is no problem. But how to use more then one?
The inputparms are entered by the user.

Any input welcome, thanks
Hans
 
Under the data tab in the "Input Parmeter" property put in the format of.
@Param1=yoursource,@Param2=yourothersource
 
Thanks for the answer.
Unfortunately this does not function the way I want it.
I tried it and later did I also read, that this results in the FIRST parm being 'automatic', the next parm results in a question to the user.

I solved it by writing my parms to a table with a parmrecord per user, which I think is a clumsy way of doing. So, the only thing I give to my SP is the userID, as the SP starts with reading the parmrecord.

But it's functioning, and that's many a time what counts :)

Thanks again, Hans
 
I have used this syntax many time on Forms
@Param1=yoursource,@Param2=yourothersource

I guess if the first parameter contained NULLS then it may not work as expected. If the parameters are integers then at the very least a 0 should be supplied.
 
OK, I'll give it another try tomorrow.
Thanks.

I'll report back to you.
Good night.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top