Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to manipulate dynamically subform source object

Status
Not open for further replies.

akinia

Programmer
Nov 23, 2000
69
BE
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.

 
Sorry everyone I've found my error.

The code needed was:
Me!SubQueryByForm.SourceObject="qryFrmContract"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top