I have a form.
In this form I have a subform.
The subform is not any specific form. I just clicked the subform tool and drew a subform.
Then in my code I'm trying to change the source object of the subform to a dynamically generated query.
I can easily do:
Me.child8.SourceObject = "Query.qryTest"
but I can't do anything like
Me.child8.SourceObject = "SELECT * from tableName"
If I try to use actual SQL I get this weird error message:
"The Microsoft Jet database engine could not find the object '~sq_cfrmLSTATSearch~sq_cChild8'. Make sure the object exists and that yous pell its name and the path name correctly."
What I'm trying to do is so simple yet it seems impossible. Any ideas?
In this form I have a subform.
The subform is not any specific form. I just clicked the subform tool and drew a subform.
Then in my code I'm trying to change the source object of the subform to a dynamically generated query.
I can easily do:
Me.child8.SourceObject = "Query.qryTest"
but I can't do anything like
Me.child8.SourceObject = "SELECT * from tableName"
If I try to use actual SQL I get this weird error message:
"The Microsoft Jet database engine could not find the object '~sq_cfrmLSTATSearch~sq_cChild8'. Make sure the object exists and that yous pell its name and the path name correctly."
What I'm trying to do is so simple yet it seems impossible. Any ideas?