Hi everyone
I've a form that I try to make it reusable. This form displays three listbox and a subform which shows the datas according to what was chosen in the listbox.
For the moment I have made three identical forms doing the same thing.In these forms the subform sourceobject refers to a form.
Changing the code to retrieve the exact datas in the listbox works fine. The SQL is well generated. The problem I get is that I need to inform the subform sourceobject to use the form corresponding to the SQL generated.
Here is the code:
Me!SubQueryByForm.Form.SourceObject="qryFrmContract"
I get an error message which says:
"The expression you entered refers to an object that is closed or doesn't exit".
Any suggestions ?? will be appreciated
Thanks in advance.
I've a form that I try to make it reusable. This form displays three listbox and a subform which shows the datas according to what was chosen in the listbox.
For the moment I have made three identical forms doing the same thing.In these forms the subform sourceobject refers to a form.
Changing the code to retrieve the exact datas in the listbox works fine. The SQL is well generated. The problem I get is that I need to inform the subform sourceobject to use the form corresponding to the SQL generated.
Here is the code:
Me!SubQueryByForm.Form.SourceObject="qryFrmContract"
I get an error message which says:
"The expression you entered refers to an object that is closed or doesn't exit".
Any suggestions ?? will be appreciated
Thanks in advance.