Subforms Using A Stored Proc

  • Thread starter Thread starter Lynn
  • Start date Start date
L

Lynn

I have a form called frmName with a subform called
sbfExample. The parent child field is called NameID.

On the subform properties itself I have set the Link Child
Fields = NameID and the Link Master Fields = NameID.

However, the subform still brings back all of the records.

I tried setting the Input Parameters on the subform to
Form!frmName!NameID, but couldn't get that to work either.
Not sure how I was suppose to do this though.

Thanks for the help!
 
L> I have a form called frmName with a subform called
L> sbfExample. The parent child field is called
L> NameID.

L> On the subform properties itself I have set the
L> Link Child Fields = NameID and the Link Master
L> Fields = NameID.

L> However, the subform still brings back all of the
L> records.

L> I tried setting the Input Parameters on the subform
L> to Form!frmName!NameID, but couldn't get that to
L> work either. Not sure how I was suppose to do this
L> though.

1. specify a parameter in the stored procedure:

create procedure MyProc (@NID int) as select ... where nameid=@nid

2. Specify subform's Input Parameters as

@nid = forms!mainform!nameid


Vadim
 
Back
Top