RossG
02-11-2002, 01:56 PM
I have a tab control with a sub-form on it.
Can I open a form with Docmd.OpenForm ( including a query as filter) and have that form appear as the tab control's sub form?
If so, what is the correct syntax to use?
TIA
Jack Cowley
02-11-2002, 02:10 PM
You can change the Object Source of the subform to any form that you like from within the main form.
Me.SubformName.SourceObject = "FormName"
RossG
02-11-2002, 09:04 PM
Me.SubformName.SourceObject = "FormName"
Thanks Jack,
Yes this works fine, but I need to open 'formname' using a query to select the appropriate fields - then have it pop up in the tab control.
I've not been able to work out how to do:
Me.SubformName.SourceObject = "FormName showing results of a query"
So far I only understand the DoCmd.OpenForm syntax, but this of course opens the form outside of the tab ctrl.
(edited to fix spelling!)
[This message has been edited by RossG (edited 02-11-2002).]