Subform Using a Stored Procedure RecordSource with Optional Parameters

  • Thread starter Robert Robichaud
  • Start date
R

Robert Robichaud

Would like to tie a subform to a SQL 2000 Stored Procedure.

The subform (OrderDetails) Record Source contains the name of the Stored
Procedure. The subform's Input Parameter points to 1 of 3 optional
parameters as @OrderID=frm.[Orders].OrderID where the form Orders is the
Parent form containing the OrderDetails subform. I expect this to return
all OrderDetails records with the same OrderID as the Orders form.

I can run the Stored Procedure in Query Analyzer but when I open the Orders
form, I'm prompted for each of the optional parameters. If I cancel the
prompts, the Orders form opens but the OrderDetails subform is blank.

Is this the correct way or is there an alternative?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top