×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

using a stored procedure as recordsource with "dynamic" inputparams

using a stored procedure as recordsource with "dynamic" inputparams

(OP)
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

RE: using a stored procedure as recordsource with "dynamic" inputparams

(OP)
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

RE: using a stored procedure as recordsource with "dynamic" inputparams

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.

RE: using a stored procedure as recordsource with "dynamic" inputparams

2
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,

RE: using a stored procedure as recordsource with "dynamic" inputparams

cmmrfrds, is this something that is in access 2000?  I do not see it within access 97.  Thanks again.

Thanks Travis.

RE: using a stored procedure as recordsource with "dynamic" inputparams

Sorry, but I believe that is the case.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close