303factory
Registered User.
- Local time
- Today, 06:46
- Joined
- Oct 10, 2008
- Messages
- 136
Hi
I have a form with a subform that displays results from a query. I'm trying to udate which query is used as the recordsource, using code.
I've been trying to use the following code:
Forms![frmResultsCase]![subfrmExhibitList].RecordSource = qryOpenExhibit
Where the main form is frmResultsCase (the form with the action button that calls the update function) and the sub form is subfrmExhibitList.
I'm getting the following error:
[my project] can't find the field 'subfrmExhibitList' referred to in your expression.
I'm pretty sure the syntax is correct becuase I use very similar syntax to update a subform elsewhere in my project. Any idea what I'm doing wrong?
Thanks
Dan

I have a form with a subform that displays results from a query. I'm trying to udate which query is used as the recordsource, using code.
I've been trying to use the following code:
Forms![frmResultsCase]![subfrmExhibitList].RecordSource = qryOpenExhibit
Where the main form is frmResultsCase (the form with the action button that calls the update function) and the sub form is subfrmExhibitList.
I'm getting the following error:
[my project] can't find the field 'subfrmExhibitList' referred to in your expression.
I'm pretty sure the syntax is correct becuase I use very similar syntax to update a subform elsewhere in my project. Any idea what I'm doing wrong?
Thanks
Dan