John said:
I have a subform whose source is a parameter query. How can I programatically
change query parameters and refresh subform without showing "Enter Parameter
Value" dialog?
Eliminate the parameter prompt and use an unbound text box
in the form's header section instead. The query's parameter
will then look like Forms!mainform.thetextbox
Users can then enter the value on the form and you can the
the text box's AfterUpdate event procedure to requery the
subform:
Me.subformcontrol.Form.Requery
Then you can set the text box's value and requery the
subform from any procedure in the main form:
Me.thetextbox = somevalue
Me.subformcontrol.Form.Requery
Or from a procedure in the subform:
Parent.thetextbox = somevalue
Me.Requery