SQL Stored Procedures Criteria Reference to msAccess adp Form

  • Thread starter Thread starter Olivier
  • Start date Start date
O

Olivier

Greetings,
Is it possible or is there a quick solution to the following question?
In msAccess mdb a select or action query criteria reference to a form is
applied that way: forms!formName!ControlName.
Now I am converting mdb applications to adp.
I have found round about ways of doing that but am not quite happy with the
performance.
Is there an efficient way of doing the same?

Thank you very much.
Regards,
Olivier
 
2 Scenarios:

1 --
If you are using a Stored Procedure w/Parameters for a record source for a
form or report you can define the parameters in the InputParameters property
of the Form/Report. It is the last line of the data tab.

In here you can reference another forms controls. i.e. If I have Report1
that is based off of stored procedure "SP_Alpha" that requires a parameter
called @Key. The parameter needs to be defined as the KeyFieldValue on
FormA, which is in the text control "txtKey".

Assuming the parameter is and Integer, Report1's Data Source would be
"dbo.SP_Alpha"

In Report1's Input Parameter you would put something like @Key INT =
Forms("FormA")("txtKey")

This gives you dynamic control of a form or report based off of a
parameterized Stored porcedure.


2 --
If you just need to run the stored procedure and it is not used as a record
source, and it doesn't return any records, you need to learn how to use
ADODB commands within Code.

HTH,
Jim
 
Back
Top