Dynamically Setting a forms Input Parameter Property

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi , I'm working with a ADP project, I have a form where I set the recordset
property at design time to a SQLServer stored procedure that has one
parameter. If I set the Input Parameter property of the form at design time
all is well. However I'd like to be a little more flexible in that I have the
calling object that Opens the form using Docmd.Openform pass OpenArgs to the
form. On the Form_Open event I set the InputParameter property of form using
the value in OpenArgs. The problem is I'm still prompted with the parameter
popup..if I press Ok everything continue on and the form opens ok. It looks
like the Form_Open event is not firing fast enough to set the Input Parameter
property...any solution to stop the popup parameter prompt.

Thanks
 
You can use the Form_Open event and OpenArgs, but if you want to suppress the
parameter popup you must also provide a default value in the input parameter
property of the form at design time: something that will definitely never
return a record, like NULL or 0.
 
Ok thanks I will give that a try

flouw said:
You can use the Form_Open event and OpenArgs, but if you want to suppress the
parameter popup you must also provide a default value in the input parameter
property of the form at design time: something that will definitely never
return a record, like NULL or 0.
 
Back
Top