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!

using a stored procedure as recordsource with "dynamic" inputparams 3

Status
Not open for further replies.

pharcyder

Programmer
Mar 12, 2002
66
0
0
DE
Hi,

I've got a report using a Stored Procedure as Recordsource.
The Stored Procedure can have parameters, i.e.
sp_test '01' shows all records where the userid = '01'

There ist the possibility to set these InputParameters in the Properties of the Report, but how can I use a textfield or a variable for these InputParameters ?

I can't change the InputParameters while the Report is in acViewPreview.

Is there perhaps another trick I can use to pass parameters to the sp ?

Thanks in advance,
Jens

 
Okay, problem solved...

you can type:
@userid = [Forms]![frm_Test]![txt_userid]
in the InputParameters-property and the stored procedure takes the value from this field....

Greetings from Germany,
Jens
 
pharcyder, where is the InputParameters - Properties Box. I have a store procedure on an SQL Server that has input variables, and I would like to send variables to it from form inputs, but can not see where to do this. Can you help. Thanks in advance for the help with this.

Thanks Travis.
 
Go to the data tab in the Form and the last property is input parameters. enter in the format of:

@parm1=myvariable,@parm2=myothervariable

or
@parm1=Forms!formname!me.myvariable,@parm2=Forms!formname!me.myothervariable,
 
cmmrfrds, is this something that is in access 2000? I do not see it within access 97. Thanks again. Thanks Travis.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top