Subform recordsource

kadara

Registered User.
Local time
Tomorrow, 00:59
Joined
Jun 19, 2010
Messages
43
Hi,

I put on a form an unbounded subform. I would like to set different recordsources to this subform depending the selected option button. Form example:
CASE 1
bound "Query1" to the subform
CASE 2
bound "Query2" to the subform

Please help.
Thanks.
 
From the main form module is a case statement to set the property:

Me!subformcontrolname.Form.RecordSource = "queryname"
 
alternatively, if you want to change the actual form (rather than the query)

you have

Me!subformcontrolname.Form.SourceObject = "formname"
 

Users who are viewing this thread

Back
Top Bottom