stored procedure value to form

  • Thread starter Thread starter Vincent Jones
  • Start date Start date
V

Vincent Jones

if i have a stored procedure as the recordsource of a form. and the
stored procedure has variables. is there a way to pass the variable
that you entered into the stored procedure onto the form.
 
You would have to return it as part of your recordset by adding it to your
select statment.

For example

SELECT t.field1,
t.field2,
t.field3,
@Variable1 as Var1,
@Variable2 as Var2
FROM Table t

The value will be the same in every record, but this is the only way I can
think of doing it if this is the form record source.

If you were running the Stored Procedure from code, you could pull return
variables.

HTH,
J. Clay
 
Back
Top