Dynamically Setting a forms Input Parameter Property

K

Kerry

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
 
F

flouw

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.
 
K

Kerry

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top