D
Dan McClelland
Access XP front end, SQL Server 2K back end.
Want to set the value of a form's InputParameters property
dynamically, in code. The form's recordsource is a stored
procedure with 2 input parameters. The values of these 2
parameters do not exist on any controls and I don't want
the user prompted for the values. I will be loading 2
global variables with the parameter values.
I figured I'd try to set the InputParameters property in
code, like this:
Me.InputParameters = "@Param1 int = " & myVariable
& ", @Param2 int = " & myVariable
But where do I put this code? It doesn't appear to work
in the form's open or load events. It doesn't work in the
InputParameter property on the property sheet. I'd like
to avoid passing the parameters with ADO code if
possible. Perhaps I'm not following the sequence of
events of a form opening, gathering its data from a stored
procedure and handling its Input Parameters.
Want to set the value of a form's InputParameters property
dynamically, in code. The form's recordsource is a stored
procedure with 2 input parameters. The values of these 2
parameters do not exist on any controls and I don't want
the user prompted for the values. I will be loading 2
global variables with the parameter values.
I figured I'd try to set the InputParameters property in
code, like this:
Me.InputParameters = "@Param1 int = " & myVariable
& ", @Param2 int = " & myVariable
But where do I put this code? It doesn't appear to work
in the form's open or load events. It doesn't work in the
InputParameter property on the property sheet. I'd like
to avoid passing the parameters with ADO code if
possible. Perhaps I'm not following the sequence of
events of a form opening, gathering its data from a stored
procedure and handling its Input Parameters.