R RossG Registered User. Local time Today, 19:14 Joined Apr 18, 2001 Messages 21 Feb 11, 2002 #1 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
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
J Jack Cowley Registered User. Local time Today, 19:14 Joined Aug 7, 2000 Messages 2,636 Feb 11, 2002 #2 You can change the Object Source of the subform to any form that you like from within the main form. Me.SubformName.SourceObject = "FormName"
You can change the Object Source of the subform to any form that you like from within the main form. Me.SubformName.SourceObject = "FormName"
R RossG Registered User. Local time Today, 19:14 Joined Apr 18, 2001 Messages 21 Feb 12, 2002 #3 Me.SubformName.SourceObject = "FormName" Click to expand... 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).]
Me.SubformName.SourceObject = "FormName" Click to expand... 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).]