Open form as subform in Tab Control

RossG

Registered User.
Local time
Today, 19:33
Joined
Apr 18, 2001
Messages
21
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
 
You can change the Object Source of the subform to any form that you like from within the main form.

Me.SubformName.SourceObject = "FormName"
 
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).]
 

Users who are viewing this thread

Back
Top Bottom